From 4e56411a99871e871fb0d47250b2668277b5463e Mon Sep 17 00:00:00 2001 From: David Bremner Date: Sun, 7 Jun 2015 17:01:57 +0200 Subject: [PATCH] [PATCH 04/10] lib: remove use of notmuch_query_search_messages from query.cc --- 10/dc88eb06aefaa37371ca731513beccbd010c82 | 77 +++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 10/dc88eb06aefaa37371ca731513beccbd010c82 diff --git a/10/dc88eb06aefaa37371ca731513beccbd010c82 b/10/dc88eb06aefaa37371ca731513beccbd010c82 new file mode 100644 index 000000000..82bd59ab3 --- /dev/null +++ b/10/dc88eb06aefaa37371ca731513beccbd010c82 @@ -0,0 +1,77 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by arlo.cworth.org (Postfix) with ESMTP id 8E8796DE15BE + for ; Sun, 7 Jun 2015 08:05:03 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at cworth.org +X-Spam-Flag: NO +X-Spam-Score: 0.22 +X-Spam-Level: +X-Spam-Status: No, score=0.22 tagged_above=-999 required=5 tests=[AWL=0.210, + T_HEADER_FROM_DIFFERENT_DOMAINS=0.01] autolearn=disabled +Received: from arlo.cworth.org ([127.0.0.1]) + by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id YdF0d_b9oP4S for ; + Sun, 7 Jun 2015 08:05:01 -0700 (PDT) +Received: from mx.xen14.node3324.gplhost.com (gitolite.debian.net + [87.98.215.224]) + by arlo.cworth.org (Postfix) with ESMTPS id 90DEE6DE1641 + for ; Sun, 7 Jun 2015 08:05:01 -0700 (PDT) +Received: from remotemail by mx.xen14.node3324.gplhost.com with local (Exim + 4.80) (envelope-from ) + id 1Z1c7Y-0004pQ-2i; Sun, 07 Jun 2015 15:04:20 +0000 +Received: (nullmailer pid 7856 invoked by uid 1000); Sun, 07 Jun 2015 + 15:02:11 -0000 +From: David Bremner +To: notmuch@notmuchmail.org +Subject: [PATCH 04/10] lib: remove use of notmuch_query_search_messages from + query.cc +Date: Sun, 7 Jun 2015 17:01:57 +0200 +Message-Id: <1433689323-7520-5-git-send-email-david@tethera.net> +X-Mailer: git-send-email 2.1.4 +In-Reply-To: <1433689323-7520-1-git-send-email-david@tethera.net> +References: <1433689323-7520-1-git-send-email-david@tethera.net> +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.18 +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: Sun, 07 Jun 2015 15:05:03 -0000 + +There is not too much point in worrying about the bad error reporting +here, because the count api is due for the same deprecation. +--- + lib/query.cc | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/lib/query.cc b/lib/query.cc +index 5275b5a..f53215d 100644 +--- a/lib/query.cc ++++ b/lib/query.cc +@@ -618,10 +618,14 @@ notmuch_query_count_threads (notmuch_query_t *query) + GHashTable *hash; + unsigned int count; + notmuch_sort_t sort; ++ notmuch_status_t status; + + sort = query->sort; + query->sort = NOTMUCH_SORT_UNSORTED; +- messages = notmuch_query_search_messages (query); ++ status = notmuch_query_search_messages_st (query, &messages); ++ if (status) ++ return 0; ++ + query->sort = sort; + if (messages == NULL) + return 0; +-- +2.1.4 + -- 2.26.2