]> git.notmuchmail.org Git - notmuch/commitdiff
lib: add private function to extract the database for a message.
authorDavid Bremner <david@tethera.net>
Fri, 26 Dec 2014 16:16:12 +0000 (17:16 +0100)
committerDavid Bremner <david@tethera.net>
Sat, 28 Mar 2015 23:34:15 +0000 (00:34 +0100)
This is needed by logging in functions outside message.cc that take
only a notmuch_message_t object.

lib/message.cc
lib/notmuch-private.h

index 956a70a9572f861d5ba5aadc1d4154f15794e398..b84e5e1c8895deae3d7c88d62e3235341120053b 100644 (file)
@@ -1626,3 +1626,9 @@ notmuch_message_destroy (notmuch_message_t *message)
 {
     talloc_free (message);
 }
+
+notmuch_database_t *
+_notmuch_message_database (notmuch_message_t *message)
+{
+    return message->notmuch;
+}
index 7cb6fd49d890bf9b5f718c4bf36a9e32bdc0aad2..dc58a2fd9cfaa94b3fecce214ee77a17f92af260 100644 (file)
@@ -472,6 +472,8 @@ _notmuch_doc_id_set_remove (notmuch_doc_id_set_t *doc_ids,
 void
 _notmuch_message_add_reply (notmuch_message_t *message,
                            notmuch_message_t *reply);
+notmuch_database_t *
+_notmuch_message_database (notmuch_message_t *message);
 
 /* sha1.c */