Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 54FF1431FBD for ; Sat, 7 Mar 2015 08:43:07 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 2.438 X-Spam-Level: ** X-Spam-Status: No, score=2.438 tagged_above=-999 required=5 tests=[DNS_FROM_AHBL_RHSBL=2.438] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6FBmhaM8dK9d for ; Sat, 7 Mar 2015 08:43:06 -0800 (PST) Received: from mx.xen14.node3324.gplhost.com (gitolite.debian.net [87.98.215.224]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 09479431FC9 for ; Sat, 7 Mar 2015 08:43:04 -0800 (PST) Received: from remotemail by mx.xen14.node3324.gplhost.com with local (Exim 4.80) (envelope-from ) id 1YUHny-0003jN-7k; Sat, 07 Mar 2015 16:42:22 +0000 Received: (nullmailer pid 16278 invoked by uid 1000); Sat, 07 Mar 2015 16:41:59 -0000 From: David Bremner To: notmuch@notmuchmail.org Subject: [PATCH 2/2] lib: deprecate notmuch_query_search_{threads, messages} Date: Sat, 7 Mar 2015 17:41:48 +0100 Message-Id: <1425746508-16224-2-git-send-email-david@tethera.net> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1425746508-16224-1-git-send-email-david@tethera.net> References: <1425746508-16224-1-git-send-email-david@tethera.net> X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 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: Sat, 07 Mar 2015 16:43:07 -0000 The CLI (and bindings) code should really be updated to use the new status-code-returning versions. Here are some warnings to prod us (and other clients) to do so. --- lib/notmuch.h | 41 ++++++++++++++++++++++++++--------------- 1 file changed, 26 insertions(+), 15 deletions(-) diff --git a/lib/notmuch.h b/lib/notmuch.h index 5fb51ba..6e4b768 100644 --- a/lib/notmuch.h +++ b/lib/notmuch.h @@ -781,20 +781,25 @@ notmuch_query_add_tag_exclude (notmuch_query_t *query, const char *tag); * notmuch_threads_destroy function, but there's no good reason * to call it if the query is about to be destroyed). * - * If a Xapian exception occurs this function will return NULL. - * For better error reporting, use the _st variant. - */ -notmuch_threads_t * -notmuch_query_search_threads (notmuch_query_t *query); - -/** - * Like notmuch_query_search_threads, but with a status return. */ notmuch_status_t notmuch_query_search_threads_st (notmuch_query_t *query, notmuch_threads_t **out); /** + * Like notmuch_query_search_threads_st, but without a status return. + * + * If a Xapian exception occurs this function will return NULL. + * + * @deprecated Deprecated as of libnotmuch 4.2 (notmuch 0.20). Please + * use notmuch_query_search_threads_st instead. + * + */ +DEPRECATED(4,2) +notmuch_threads_t * +notmuch_query_search_threads (notmuch_query_t *query); + +/** * Execute a query for messages, returning a notmuch_messages_t object * which can be used to iterate over the results. The returned * messages object is owned by the query and as such, will only be @@ -832,17 +837,23 @@ notmuch_query_search_threads_st (notmuch_query_t *query, * reason to call it if the query is about to be destroyed). * * If a Xapian exception occurs this function will return NULL. - * For better error reporting, use the _st variant. - */ -notmuch_messages_t * -notmuch_query_search_messages (notmuch_query_t *query); - -/** - * Like notmuch_query_search_messages, but with a status return. + * */ notmuch_status_t notmuch_query_search_messages_st (notmuch_query_t *query, notmuch_messages_t **out); +/** + * Like notmuch_query_search_messages, but without a status return. + * + * If a Xapian exception occurs this function will return NULL. + * + * @deprecated Deprecated as of libnotmuch 4.2 (notmuch 0.20). Please use + * notmuch_query_search_messages_st instead. + * + */ +DEPRECATED(4,2) +notmuch_messages_t * +notmuch_query_search_messages (notmuch_query_t *query); /** * Destroy a notmuch_query_t along with any associated resources. -- 2.1.4