[PATCH 3/3] docs: Use correct call to notmuch_query_search_threads in usage example
rhn
gihu.rhn at porcupinefactory.org
Mon Dec 17 09:57:48 PST 2018
---
lib/notmuch.h | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/lib/notmuch.h b/lib/notmuch.h
index aa032e09..00f69846 100644
--- a/lib/notmuch.h
+++ b/lib/notmuch.h
@@ -892,7 +892,12 @@ notmuch_query_add_tag_exclude (notmuch_query_t *query, const char *tag);
*
* query = notmuch_query_create (database, query_string);
*
- * for (threads = notmuch_query_search_threads (query);
+ * notmuch_status_t stat = notmuch_query_search_threads (query, &threads);
+ * if (stat != NOTMUCH_STATUS_SUCCESS) {
+ * goto exit;
+ * }
+ *
+ * for (;
* notmuch_threads_valid (threads);
* notmuch_threads_move_to_next (threads))
* {
@@ -901,6 +906,7 @@ notmuch_query_add_tag_exclude (notmuch_query_t *query, const char *tag);
* notmuch_thread_destroy (thread);
* }
*
+ * exit:
* notmuch_query_destroy (query);
*
* Note: If you are finished with a thread before its containing
--
2.17.2
More information about the notmuch
mailing list