aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDavid Bremner <david@tethera.net>2017-02-26 17:21:31 -0400
committerDavid Bremner <david@tethera.net>2017-03-22 08:28:09 -0300
commit1e982de508c39dae7a61403f536df74c180dfb72 (patch)
treeed2d60eafcb3029536f7bbaa06d2b8b78c2852b7 /lib
parentfc63c1583335d3f09392a37f65edf0b795af2782 (diff)
lib: replace n_query_search_threads with status returning version
This function was deprecated in notmuch 0.21. We finally remove the deprecated API, and rename the status returning version to the simpler name. The status returning is kept as a deprecated alias.
Diffstat (limited to 'lib')
-rw-r--r--lib/notmuch.h20
-rw-r--r--lib/query.cc17
2 files changed, 14 insertions, 23 deletions
diff --git a/lib/notmuch.h b/lib/notmuch.h
index af4efbc8..601b2e3e 100644
--- a/lib/notmuch.h
+++ b/lib/notmuch.h
@@ -855,24 +855,22 @@ notmuch_query_add_tag_exclude (notmuch_query_t *query, const char *tag);
* notmuch_threads_destroy function, but there's no good reason
* to call it if the query is about to be destroyed).
*
- * @since libnotmuch 4.2 (notmuch 0.20)
+ * @since libnotmuch 5.0 (notmuch 0.25)
*/
notmuch_status_t
-notmuch_query_search_threads_st (notmuch_query_t *query,
- notmuch_threads_t **out);
+notmuch_query_search_threads (notmuch_query_t *query,
+ notmuch_threads_t **out);
/**
- * Like notmuch_query_search_threads_st, but without a status return.
- *
- * If a Xapian exception occurs this function will return NULL.
+ * Deprecated alias for notmuch_query_search_threads.
*
- * @deprecated Deprecated as of libnotmuch 4.3 (notmuch 0.21). Please
- * use notmuch_query_search_threads_st instead.
+ * @deprecated Deprecated as of libnotmuch 5 (notmuch 0.25). Please
+ * use notmuch_query_search_threads instead.
*
*/
-NOTMUCH_DEPRECATED(4,3)
-notmuch_threads_t *
-notmuch_query_search_threads (notmuch_query_t *query);
+NOTMUCH_DEPRECATED(5,0)
+notmuch_status_t
+notmuch_query_search_threads_st (notmuch_query_t *query, notmuch_threads_t **out);
/**
* Execute a query for messages, returning a notmuch_messages_t object
diff --git a/lib/query.cc b/lib/query.cc
index 59e9141a..2581ee64 100644
--- a/lib/query.cc
+++ b/lib/query.cc
@@ -497,22 +497,15 @@ _notmuch_threads_destructor (notmuch_threads_t *threads)
return 0;
}
-
-notmuch_threads_t *
-notmuch_query_search_threads (notmuch_query_t *query)
+notmuch_status_t
+notmuch_query_search_threads_st (notmuch_query_t *query, notmuch_threads_t **out)
{
- notmuch_status_t status;
- notmuch_threads_t *threads;
- status = notmuch_query_search_threads_st (query, &threads);
- if (status)
- return NULL;
- else
- return threads;
+ return notmuch_query_search_threads(query, out);
}
notmuch_status_t
-notmuch_query_search_threads_st (notmuch_query_t *query,
- notmuch_threads_t **out)
+notmuch_query_search_threads (notmuch_query_t *query,
+ notmuch_threads_t **out)
{
notmuch_threads_t *threads;
notmuch_messages_t *messages;