[PATCH 07/10] lib: constify argument to notmuch_database_status_string

David Bremner david at tethera.net
Sun Jun 7 08:02:00 PDT 2015


We don't modify the database struct, so no harm in committing to that.
---
 lib/database.cc | 2 +-
 lib/notmuch.h   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/database.cc b/lib/database.cc
index 15619c3..3ef8eaa 100644
--- a/lib/database.cc
+++ b/lib/database.cc
@@ -2578,7 +2578,7 @@ notmuch_database_get_all_tags (notmuch_database_t *db)
 }
 
 const char *
-notmuch_database_status_string (notmuch_database_t *notmuch)
+notmuch_database_status_string (const notmuch_database_t *notmuch)
 {
     return notmuch->status_string;
 }
diff --git a/lib/notmuch.h b/lib/notmuch.h
index 46115c8..56d5ac4 100644
--- a/lib/notmuch.h
+++ b/lib/notmuch.h
@@ -308,7 +308,7 @@ notmuch_database_open_verbose (const char *path,
  *
  */
 const char *
-notmuch_database_status_string (notmuch_database_t *notmuch);
+notmuch_database_status_string (const notmuch_database_t *notmuch);
 
 /**
  * Commit changes and close the given notmuch database.
-- 
2.1.4



More information about the notmuch mailing list