From 59e14e6b34f39a15731eb047135442e729bc2d2a Mon Sep 17 00:00:00 2001 From: David Bremner Date: Fri, 27 Mar 2015 23:11:58 +0100 Subject: [PATCH] [Patch v6 6/8] lib: add private function to extract the database for a message. --- 8a/61437c77080d3aa51347a5f88b62a5219bd641 | 87 +++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 8a/61437c77080d3aa51347a5f88b62a5219bd641 diff --git a/8a/61437c77080d3aa51347a5f88b62a5219bd641 b/8a/61437c77080d3aa51347a5f88b62a5219bd641 new file mode 100644 index 000000000..5cb1efe22 --- /dev/null +++ b/8a/61437c77080d3aa51347a5f88b62a5219bd641 @@ -0,0 +1,87 @@ +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 0E386429E28 + for ; Fri, 27 Mar 2015 15:14:13 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 2.438 +X-Spam-Level: ** +X-Spam-Status: No, score=2.438 tagged_above=-999 required=5 + tests=[DNS_FROM_AHBL_RHSBL=2.438] 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 aAKoIn4HU66h for ; + Fri, 27 Mar 2015 15:14:10 -0700 (PDT) +Received: from mx.xen14.node3324.gplhost.com (gitolite.debian.net + [87.98.215.224]) + (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 4CB2F431E82 + for ; Fri, 27 Mar 2015 15:14:10 -0700 (PDT) +Received: from remotemail by mx.xen14.node3324.gplhost.com with local (Exim + 4.80) (envelope-from ) + id 1YbcVM-0000F4-VB; Fri, 27 Mar 2015 22:13:28 +0000 +Received: (nullmailer pid 1817 invoked by uid 1000); Fri, 27 Mar 2015 + 22:12:15 -0000 +From: David Bremner +To: notmuch@notmuchmail.org +Subject: [Patch v6 6/8] lib: add private function to extract the database for + a message. +Date: Fri, 27 Mar 2015 23:11:58 +0100 +Message-Id: <1427494320-1483-7-git-send-email-david@tethera.net> +X-Mailer: git-send-email 2.1.4 +In-Reply-To: <1427494320-1483-1-git-send-email-david@tethera.net> +References: <1427494320-1483-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, 27 Mar 2015 22:14:13 -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 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 + -- 2.26.2