X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=lib%2Fquery.cc;h=7192e7f049ddbb678d55ab07219aefa491ea74e3;hp=2581ee64a4932726307f68657ffcc1f889a27cee;hb=86cbd215eb67d7b996c977352a50e70c101cb641;hpb=1e982de508c39dae7a61403f536df74c180dfb72 diff --git a/lib/query.cc b/lib/query.cc index 2581ee64..7192e7f0 100644 --- a/lib/query.cc +++ b/lib/query.cc @@ -233,20 +233,16 @@ _notmuch_exclude_tags (notmuch_query_t *query) return exclude_query; } -notmuch_messages_t * -notmuch_query_search_messages (notmuch_query_t *query) + +notmuch_status_t +notmuch_query_search_messages_st (notmuch_query_t *query, + notmuch_messages_t **out) { - notmuch_status_t status; - notmuch_messages_t *messages; - status = notmuch_query_search_messages_st (query, &messages); - if (status) - return NULL; - else - return messages; + return notmuch_query_search_messages (query, out); } notmuch_status_t -notmuch_query_search_messages_st (notmuch_query_t *query, +notmuch_query_search_messages (notmuch_query_t *query, notmuch_messages_t **out) { return _notmuch_query_search_documents (query, "mail", out); @@ -519,7 +515,7 @@ notmuch_query_search_threads (notmuch_query_t *query, threads->query = query; - status = notmuch_query_search_messages_st (query, &messages); + status = notmuch_query_search_messages (query, &messages); if (status) { talloc_free (threads); return status; @@ -708,7 +704,7 @@ notmuch_query_count_threads_st (notmuch_query_t *query, unsigned *count) sort = query->sort; query->sort = NOTMUCH_SORT_UNSORTED; - ret = notmuch_query_search_messages_st (query, &messages); + ret = notmuch_query_search_messages (query, &messages); if (ret) return ret; query->sort = sort;