]> git.notmuchmail.org Git - notmuch/commitdiff
docs: Use correct call to notmuch_query_search_threads in usage example
authorrhn <gihu.rhn@porcupinefactory.org>
Mon, 17 Dec 2018 17:57:48 +0000 (17:57 +0000)
committerDavid Bremner <david@tethera.net>
Sat, 26 Jan 2019 00:51:00 +0000 (20:51 -0400)
Amended by db: simplify (subjectively) the example.

lib/notmuch.h

index aa032e092e9b1b396d77309e4e25b54e1edde135..24708f3c5947c6819570f493bb249284e40407cc 100644 (file)
@@ -889,10 +889,12 @@ notmuch_query_add_tag_exclude (notmuch_query_t *query, const char *tag);
  *     notmuch_query_t *query;
  *     notmuch_threads_t *threads;
  *     notmuch_thread_t *thread;
  *     notmuch_query_t *query;
  *     notmuch_threads_t *threads;
  *     notmuch_thread_t *thread;
+ *     notmuch_status_t stat;
  *
  *     query = notmuch_query_create (database, query_string);
  *
  *
  *     query = notmuch_query_create (database, query_string);
  *
- *     for (threads = notmuch_query_search_threads (query);
+ *     for (stat = notmuch_query_search_threads (query, &threads);
+ *         stat == NOTMUCH_STATUS_SUCCESS &&
  *          notmuch_threads_valid (threads);
  *          notmuch_threads_move_to_next (threads))
  *     {
  *          notmuch_threads_valid (threads);
  *          notmuch_threads_move_to_next (threads))
  *     {