diff options
| author | David Bremner <david@tethera.net> | 2017-02-26 17:21:32 -0400 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2017-03-22 08:35:07 -0300 |
| commit | 86cbd215eb67d7b996c977352a50e70c101cb641 (patch) | |
| tree | 2186342f5aa9f2d11c275eb30cfbbca5330e4fa2 /lib | |
| parent | 1e982de508c39dae7a61403f536df74c180dfb72 (diff) | |
lib: replace deprecated n_q_search_messages with status returning version
This function was deprecated in notmuch 0.21. We re-use the name for
a status returning version, and deprecate the _st name.
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/database.cc | 2 | ||||
| -rw-r--r-- | lib/notmuch.h | 22 | ||||
| -rw-r--r-- | lib/query.cc | 20 | ||||
| -rw-r--r-- | lib/thread.cc | 2 |
4 files changed, 21 insertions, 25 deletions
diff --git a/lib/database.cc b/lib/database.cc index a679cbab..125c4b92 100644 --- a/lib/database.cc +++ b/lib/database.cc @@ -1531,7 +1531,7 @@ notmuch_database_upgrade (notmuch_database_t *notmuch, query = notmuch_query_create (notmuch, ""); - status = notmuch_query_search_messages_st (query, &messages); + status = notmuch_query_search_messages (query, &messages); if (status) goto DONE; for (; diff --git a/lib/notmuch.h b/lib/notmuch.h index 601b2e3e..4b01e3ad 100644 --- a/lib/notmuch.h +++ b/lib/notmuch.h @@ -911,23 +911,23 @@ notmuch_query_search_threads_st (notmuch_query_t *query, notmuch_threads_t **out * * If a Xapian exception occurs this function will return NULL. * - * @since libnotmuch 4.2 (notmuch 0.20) + * @since libnotmuch 5 (notmuch 0.25) */ notmuch_status_t -notmuch_query_search_messages_st (notmuch_query_t *query, - notmuch_messages_t **out); +notmuch_query_search_messages (notmuch_query_t *query, + notmuch_messages_t **out); /** - * Like notmuch_query_search_messages, but without a status return. - * - * If a Xapian exception occurs this function will return NULL. + * Deprecated alias for notmuch_query_search_messages * - * @deprecated Deprecated as of libnotmuch 4.3 (notmuch 0.21). Please use - * notmuch_query_search_messages_st instead. + * @deprecated Deprecated as of libnotmuch 5 (notmuch 0.25). Please use + * notmuch_query_search_messages instead. * */ -NOTMUCH_DEPRECATED(4,3) -notmuch_messages_t * -notmuch_query_search_messages (notmuch_query_t *query); + +NOTMUCH_DEPRECATED(5,0) +notmuch_status_t +notmuch_query_search_messages_st (notmuch_query_t *query, + notmuch_messages_t **out); /** * Destroy a notmuch_query_t along with any associated resources. 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; diff --git a/lib/thread.cc b/lib/thread.cc index 84ee5298..561ca5be 100644 --- a/lib/thread.cc +++ b/lib/thread.cc @@ -505,7 +505,7 @@ _notmuch_thread_create (void *ctx, * oldest or newest subject is desired. */ notmuch_query_set_sort (thread_id_query, NOTMUCH_SORT_OLDEST_FIRST); - status = notmuch_query_search_messages_st (thread_id_query, &messages); + status = notmuch_query_search_messages (thread_id_query, &messages); if (status) goto DONE; |
