lib: make notmuch_message_get_database() take a const notmuch_message_t*
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Fri, 11 May 2018 06:57:54 +0000 (02:57 -0400)
committerDavid Bremner <david@tethera.net>
Sat, 26 May 2018 14:32:01 +0000 (07:32 -0700)
This is technically an API change, but it is not an ABI change, and
it's merely a statement that limits what the library can do.

This is in parallel to notmuch_query_get_database(), which also takes
a const pointer.

lib/message.cc
lib/notmuch.h

index a7e8c3cac4504dc9fec59611c7c0dcdf5539dbf2..153e4bed01e370021ec508e76fe7746fc91bcddd 100644 (file)
@@ -1925,7 +1925,7 @@ notmuch_message_destroy (notmuch_message_t *message)
 }
 
 notmuch_database_t *
-notmuch_message_get_database (notmuch_message_t *message)
+notmuch_message_get_database (const notmuch_message_t *message)
 {
     return message->notmuch;
 }
index a8981c5c0e38f1c469feb1aa2689e4eeade1dacf..247f6ad71ebf1223b32f1c2b5e226261a309ffc1 100644 (file)
@@ -1351,7 +1351,7 @@ notmuch_messages_collect_tags (notmuch_messages_t *messages);
  * @since libnotmuch 5.2 (notmuch 0.27)
  */
 notmuch_database_t *
-notmuch_message_get_database (notmuch_message_t *message);
+notmuch_message_get_database (const notmuch_message_t *message);
 
 /**
  * Get the message ID of 'message'.