[PATCH 04/10] lib: remove use of notmuch_query_search_messages from query.cc

Subject: [PATCH 04/10] lib: remove use of notmuch_query_search_messages from query.cc

Date: Sun, 7 Jun 2015 17:01:57 +0200

To: notmuch@notmuchmail.org

Cc:

From: David Bremner


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


Thread: