From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 4070F6DE00F5 for ; Mon, 17 Dec 2018 10:06:33 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: 0.362 X-Spam-Level: X-Spam-Status: No, score=0.362 tagged_above=-999 required=5 tests=[AWL=0.000, KHOP_DYNAMIC=0.001, RDNS_DYNAMIC=0.363, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id AroRqdErM2sn for ; Mon, 17 Dec 2018 10:06:32 -0800 (PST) Received: from porcupinefactory.org (91.218.216.54.siec.idealan.pl [91.218.216.54]) by arlo.cworth.org (Postfix) with ESMTPS id 0F44C6DE01E6 for ; Mon, 17 Dec 2018 10:06:31 -0800 (PST) Received: from movable.Speedport_W_723V_1_46_000 (unknown [192.168.6.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by porcupinefactory.org (Postfix) with ESMTPSA id EE38B675584; Mon, 17 Dec 2018 18:57:25 +0100 (CET) From: rhn To: notmuch@notmuchmail.org Cc: rhn Subject: [PATCH 3/3] docs: Use correct call to notmuch_query_search_threads in usage example Date: Mon, 17 Dec 2018 17:57:48 +0000 Message-Id: <20181217175748.10814-4-gihu.rhn@porcupinefactory.org> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20181217175748.10814-1-gihu.rhn@porcupinefactory.org> References: <20181217175748.10814-1-gihu.rhn@porcupinefactory.org> X-Mailman-Approved-At: Mon, 17 Dec 2018 10:14:16 -0800 X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Dec 2018 18:06:33 -0000 --- 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