diff options
| author | David Bremner <david@tethera.net> | 2017-02-26 17:21:35 -0400 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2017-03-22 08:35:07 -0300 |
| commit | 3721bd45d72e50436ee760b03ae533d49bbb8724 (patch) | |
| tree | 7d989a019989f5eded02951a8ccb36fba2b82b00 /lib | |
| parent | 5ce8e0b11b40f733e6231d2067764e76717a341a (diff) | |
lib: replace deprecated n_q_count_threads 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/notmuch.h | 16 | ||||
| -rw-r--r-- | lib/query.cc | 12 |
2 files changed, 11 insertions, 17 deletions
diff --git a/lib/notmuch.h b/lib/notmuch.h index b79618f6..e692e9bb 100644 --- a/lib/notmuch.h +++ b/lib/notmuch.h @@ -1044,22 +1044,20 @@ notmuch_query_count_messages_st (notmuch_query_t *query, unsigned int *count); * NOTMUCH_STATUS_XAPIAN_EXCEPTION: a Xapian exception occured. The * value of *count is not defined. * - * @since libnotmuch 4.3 (notmuch 0.21) + * @since libnotmuch 5 (notmuch 0.25) */ notmuch_status_t -notmuch_query_count_threads_st (notmuch_query_t *query, unsigned *count); +notmuch_query_count_threads (notmuch_query_t *query, unsigned *count); /** - * like notmuch_query_count_threads, but without a status return. - * - * May return 0 in case of errors. + * Deprecated alias for notmuch_query_count_threads * - * @deprecated Deprecated as of libnotmuch 4.3 (notmuch 0.21). Please + * @deprecated Deprecated as of libnotmuch 5.0 (notmuch 0.25). Please * use notmuch_query_count_threads_st instead. */ -NOTMUCH_DEPRECATED(4,3) -unsigned int -notmuch_query_count_threads (notmuch_query_t *query); +NOTMUCH_DEPRECATED(5,0) +notmuch_status_t +notmuch_query_count_threads_st (notmuch_query_t *query, unsigned *count); /** * Get the thread ID of 'thread'. diff --git a/lib/query.cc b/lib/query.cc index 754ccfcc..b7d4d352 100644 --- a/lib/query.cc +++ b/lib/query.cc @@ -680,18 +680,14 @@ _notmuch_query_count_documents (notmuch_query_t *query, const char *type, unsign return NOTMUCH_STATUS_SUCCESS; } -unsigned -notmuch_query_count_threads (notmuch_query_t *query) +notmuch_status_t +notmuch_query_count_threads_st (notmuch_query_t *query, unsigned *count) { - notmuch_status_t status; - unsigned int count; - - status = notmuch_query_count_threads_st (query, &count); - return status ? 0 : count; + return notmuch_query_count_threads (query, count); } notmuch_status_t -notmuch_query_count_threads_st (notmuch_query_t *query, unsigned *count) +notmuch_query_count_threads (notmuch_query_t *query, unsigned *count) { notmuch_messages_t *messages; GHashTable *hash; |
