From: David Bremner Date: Fri, 26 Dec 2014 16:16:12 +0000 (+0100) Subject: lib: add private function to extract the database for a message. X-Git-Tag: 0.20~24 X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=commitdiff_plain;h=9b73a8bcc9cb381fc1a15013f4baa3ec9fdb97a7;hp=b53e1a2da720e9a0efd815b92f0a54dc2f644ffc lib: add private function to extract the database for a message. This is needed by logging in functions outside message.cc that take only a notmuch_message_t object. --- diff --git a/lib/message.cc b/lib/message.cc index 956a70a9..b84e5e1c 100644 --- a/lib/message.cc +++ b/lib/message.cc @@ -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; +} diff --git a/lib/notmuch-private.h b/lib/notmuch-private.h index 7cb6fd49..dc58a2fd 100644 --- a/lib/notmuch-private.h +++ b/lib/notmuch-private.h @@ -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 */