From: David Bremner Date: Fri, 26 Dec 2014 17:42:39 +0000 (+0100) Subject: [PATCH 2/4] lib: add private function to extract the database for a message. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=4d9ee3d38001baa53321196ba80f0bbe53ce2db7;p=notmuch-archives.git [PATCH 2/4] lib: add private function to extract the database for a message. --- diff --git a/59/ae26c37733bf47f90b9ce5afb70d004d9c243e b/59/ae26c37733bf47f90b9ce5afb70d004d9c243e new file mode 100644 index 000000000..622d8f111 --- /dev/null +++ b/59/ae26c37733bf47f90b9ce5afb70d004d9c243e @@ -0,0 +1,86 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id AAC48431FC0 + for ; Fri, 26 Dec 2014 09:43:38 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0 +X-Spam-Level: +X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] + autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id Oxg3JbQr57rk for ; + Fri, 26 Dec 2014 09:43:36 -0800 (PST) +Received: from yantan.tethera.net (yantan.tethera.net [199.188.72.155]) + (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 5E4F8429E26 + for ; Fri, 26 Dec 2014 09:43:36 -0800 (PST) +Received: from remotemail by yantan.tethera.net with local (Exim 4.80) + (envelope-from ) + id 1Y4YvI-00060V-2S; Fri, 26 Dec 2014 13:43:36 -0400 +Received: (nullmailer pid 21756 invoked by uid 1000); Fri, 26 Dec 2014 + 17:43:08 -0000 +From: David Bremner +To: notmuch@notmuchmail.org +Subject: [PATCH 2/4] lib: add private function to extract the database for a + message. +Date: Fri, 26 Dec 2014 18:42:39 +0100 +Message-Id: <1419615761-21581-3-git-send-email-david@tethera.net> +X-Mailer: git-send-email 2.1.3 +In-Reply-To: <1419615761-21581-1-git-send-email-david@tethera.net> +References: <1419615761-21581-1-git-send-email-david@tethera.net> +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Fri, 26 Dec 2014 17:43:39 -0000 + +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 a7a13cc..43cc078 100644 +--- a/lib/message.cc ++++ b/lib/message.cc +@@ -1625,3 +1625,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 012ad25..d4b4858 100644 +--- a/lib/notmuch-private.h ++++ b/lib/notmuch-private.h +@@ -469,6 +469,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.3 +