From: David Bremner Date: Sun, 7 Jun 2015 15:01:57 +0000 (+0200) Subject: lib: remove use of notmuch_query_search_messages from query.cc X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=f16944c3b40be414aac85762e2f075a9d1239736;p=notmuch.git lib: remove use of notmuch_query_search_messages from query.cc There is not too much point in worrying about the bad error reporting here, because the count api is due for the same deprecation. --- diff --git a/lib/query.cc b/lib/query.cc index 5275b5a2..f53215db 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;