1 Return-Path: <bremner@tesseract.cs.unb.ca>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by arlo.cworth.org (Postfix) with ESMTP id 213026DE158D
\r
6 for <notmuch@notmuchmail.org>; Sun, 7 Jun 2015 08:05:40 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at cworth.org
\r
11 X-Spam-Status: No, score=0.217 tagged_above=-999 required=5 tests=[AWL=0.207,
\r
12 T_HEADER_FROM_DIFFERENT_DOMAINS=0.01] autolearn=disabled
\r
13 Received: from arlo.cworth.org ([127.0.0.1])
\r
14 by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id MmdXu6vCCVV8 for <notmuch@notmuchmail.org>;
\r
16 Sun, 7 Jun 2015 08:05:38 -0700 (PDT)
\r
17 Received: from mx.xen14.node3324.gplhost.com (gitolite.debian.net
\r
19 by arlo.cworth.org (Postfix) with ESMTPS id 57FF36DE1502
\r
20 for <notmuch@notmuchmail.org>; Sun, 7 Jun 2015 08:05:38 -0700 (PDT)
\r
21 Received: from remotemail by mx.xen14.node3324.gplhost.com with local (Exim
\r
22 4.80) (envelope-from <bremner@tesseract.cs.unb.ca>)
\r
23 id 1Z1c88-0004qU-Pv; Sun, 07 Jun 2015 15:04:56 +0000
\r
24 Received: (nullmailer pid 7854 invoked by uid 1000); Sun, 07 Jun 2015
\r
26 From: David Bremner <david@tethera.net>
\r
27 To: notmuch@notmuchmail.org
\r
28 Subject: [PATCH 03/10] lib: add public accessor for database from query
\r
29 Date: Sun, 7 Jun 2015 17:01:56 +0200
\r
30 Message-Id: <1433689323-7520-4-git-send-email-david@tethera.net>
\r
31 X-Mailer: git-send-email 2.1.4
\r
32 In-Reply-To: <1433689323-7520-1-git-send-email-david@tethera.net>
\r
33 References: <1433689323-7520-1-git-send-email-david@tethera.net>
\r
34 X-BeenThere: notmuch@notmuchmail.org
\r
35 X-Mailman-Version: 2.1.18
\r
37 List-Id: "Use and development of the notmuch mail system."
\r
38 <notmuch.notmuchmail.org>
\r
39 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
40 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
41 List-Archive: <http://notmuchmail.org/pipermail/notmuch/>
\r
42 List-Post: <mailto:notmuch@notmuchmail.org>
\r
43 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
44 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
45 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
46 X-List-Received-Date: Sun, 07 Jun 2015 15:05:40 -0000
\r
48 This is to make it easier for clients of the library to update to the
\r
49 new error code returning versions of notmuch_query_search_messages
\r
51 lib/Makefile.local | 2 +-
\r
52 lib/notmuch.h | 6 ++++++
\r
53 lib/query.cc | 6 ++++++
\r
54 3 files changed, 13 insertions(+), 1 deletion(-)
\r
56 diff --git a/lib/Makefile.local b/lib/Makefile.local
\r
57 index f9ecd50..aa76b61 100644
\r
58 --- a/lib/Makefile.local
\r
59 +++ b/lib/Makefile.local
\r
60 @@ -11,7 +11,7 @@ LIBNOTMUCH_VERSION_MAJOR = 4
\r
61 # the time of release for any additions to the library interface,
\r
62 # (and when it is incremented, the release version of the library should
\r
64 -LIBNOTMUCH_VERSION_MINOR = 2
\r
65 +LIBNOTMUCH_VERSION_MINOR = 3
\r
67 # The release version the library interface. This should be incremented at
\r
68 # the time of release if there have been no changes to the interface, (but
\r
69 diff --git a/lib/notmuch.h b/lib/notmuch.h
\r
70 index c2ada4b..46115c8 100644
\r
73 @@ -708,6 +708,12 @@ const char *
\r
74 notmuch_query_get_query_string (notmuch_query_t *query);
\r
77 + * Return the notmuch database of this query. See notmuch_query_create.
\r
79 +notmuch_database_t *
\r
80 +notmuch_query_get_database (notmuch_query_t *query);
\r
83 * Exclude values for notmuch_query_set_omit_excluded. The strange
\r
84 * order is to maintain backward compatibility: the old FALSE/TRUE
\r
85 * options correspond to the new
\r
86 diff --git a/lib/query.cc b/lib/query.cc
\r
87 index 9cedb6a..5275b5a 100644
\r
90 @@ -654,3 +654,9 @@ notmuch_query_count_threads (notmuch_query_t *query)
\r
95 +notmuch_database_t *
\r
96 +notmuch_query_get_database (notmuch_query_t *query)
\r
98 + return query->notmuch;
\r