[Patch v6 6/8] lib: add private function to extract the database for a message.
David Bremner
david at tethera.net
Fri Mar 27 15:11:58 PDT 2015
This is needed by logging in functions outside message.cc that take
only a notmuch_message_t object.
---
lib/message.cc | 6 ++++++
lib/notmuch-private.h | 2 ++
2 files changed, 8 insertions(+)
diff --git a/lib/message.cc b/lib/message.cc
index 956a70a..b84e5e1 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 7cb6fd4..dc58a2f 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 */
--
2.1.4
More information about the notmuch
mailing list