raise NotmuchError(status)
return count.value
- _count_threads = nmlib.notmuch_query_count_threads_st
+ _count_threads = nmlib.notmuch_query_count_threads
_count_threads.argtypes = [NotmuchQueryP, POINTER(c_uint)]
_count_threads.restype = c_uint
Data_Get_Notmuch_Query (self, query);
- status = notmuch_query_count_threads_st (query, &count);
+ status = notmuch_query_count_threads (query, &count);
if (status)
notmuch_rb_status_raise (status);
* 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'.
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;
printf ("%u", ucount);
break;
case OUTPUT_THREADS:
- status = notmuch_query_count_threads_st (query, &ucount);
+ status = notmuch_query_count_threads (query, &ucount);
if (print_status_query ("notmuch count", query, status))
return -1;
printf ("%u", ucount);
if (ctx->offset < 0) {
unsigned count;
notmuch_status_t status;
- status = notmuch_query_count_threads_st (ctx->query, &count);
+ status = notmuch_query_count_threads (ctx->query, &count);
if (print_status_query ("notmuch search", ctx->query, status))
return 1;