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 991C06DE1D03 for ; Sat, 25 Feb 2017 11:26:27 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.183 X-Spam-Level: X-Spam-Status: No, score=-0.183 tagged_above=-999 required=5 tests=[AWL=-0.163, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01] 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 AdygJwCTDU_T for ; Sat, 25 Feb 2017 11:26:26 -0800 (PST) Received: from mail-lf0-f67.google.com (mail-lf0-f67.google.com [209.85.215.67]) by arlo.cworth.org (Postfix) with ESMTPS id 5F8696DE1CFE for ; Sat, 25 Feb 2017 11:26:26 -0800 (PST) Received: by mail-lf0-f67.google.com with SMTP id z127so3575647lfa.2 for ; Sat, 25 Feb 2017 11:26:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nikula-org.20150623.gappssmtp.com; s=20150623; h=from:to:subject:in-reply-to:references:date:message-id:mime-version; bh=CtzoczRNr4K7xMNcYL9qz2GlphKKwDAWl9KxtGnC6qE=; b=WYgh8psIiV+F3w6LKuJCzTCWThVkHTo+DBMHZnj/om1e6LDIXNIAo+Vwo6gJGtUzsC Xwe7B8OSFqaLMZemNGcC32xzX58SCAV+SU7nPV1LnY1/OkEuMAPMO5FX4/OFock6rGyP d1HdF+ZDtP0b4OvcpR4BPtC4AAKyIRfoPeGuxxAWqK8Ncva96Nz/dX4IBtJXTR8hmJEq JcEcVQA51vahYfytA3j+aeYwb3c/enGhKW7bSdF3/2LdAcYvWH78UuCerPJBbCmsaepg 7coB9c6zATCDyoKmYRZHo1t13JnRDchkb7fE2FquLxrxTBxRcNa4Fywif0P+AyyOG2Pr 2f1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:in-reply-to:references:date :message-id:mime-version; bh=CtzoczRNr4K7xMNcYL9qz2GlphKKwDAWl9KxtGnC6qE=; b=U/tK4vx1WWVc4u0IonVsuv+fq6SZyNUAPkaXi90M1rbS2RrC+Jy/35d8sOrzLW6HgM BKz4ycRc/o1wLUwVuRC/UNC/rTu6VEc1rHD9zB5iDGqbkyy2kw0w6WlzRlmDc8+fUboj Ramsi5LAdRuX+HEGxjUvo0EVnb2qvW1+cQy46AOEcpqptcv5V6FYAt5m+kvR+Z7qljVg 0v9idqx3+hb1gRm73mTOoI5ATlujOhTyLDr4xDuNQKopF+xmWJqUjyHRn4L4n1lsAgI9 UNQxC3Kd3oXeB9j3w87aEcGJI6ttbfh4cYY6bHt/AiJZj4gZoVKmMCNlFPrOIfZ/S/Uv u4vw== X-Gm-Message-State: AMke39nyqzke54NB1OmBI+MTNftbXSqMCrz4vorDHOV4tshIMj8WCtFQYxS+Unv+RnlmJw== X-Received: by 10.46.7.79 with SMTP id i15mr1917339ljd.50.1488050784509; Sat, 25 Feb 2017 11:26:24 -0800 (PST) Received: from localhost (mobile-access-bcee80-14.dhcp.inet.fi. [188.238.128.14]) by smtp.gmail.com with ESMTPSA id b7sm2753223lfe.33.2017.02.25.11.26.23 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 25 Feb 2017 11:26:23 -0800 (PST) From: Jani Nikula To: David Bremner , notmuch@notmuchmail.org Subject: Re: [PATCH] lib: remove notmuch_query_{count, search}_{threads, messages} In-Reply-To: <20170223014656.9500-1-david@tethera.net> References: <20170223014656.9500-1-david@tethera.net> Date: Sat, 25 Feb 2017 21:26:22 +0200 Message-ID: <87h93i6pi9.fsf@nikula.org> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.22 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, 25 Feb 2017 19:26:27 -0000 On Wed, 22 Feb 2017, David Bremner wrote: > These 4 functions were originally deprecated in notmuch 0.21, more > than a year ago. This leaves the implementations of the functions as unused code behind. How long until we can add them back with the same signature as the _st versions, and deprecate the _st versions instead? ;) > --- > lib/notmuch.h | 50 -------------------------------------------------- > test/T560-lib-error.sh | 4 ++-- > 2 files changed, 2 insertions(+), 52 deletions(-) > > diff --git a/lib/notmuch.h b/lib/notmuch.h > index 16da8be9..5c9f5137 100644 > --- a/lib/notmuch.h > +++ b/lib/notmuch.h > @@ -862,19 +862,6 @@ 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.3 (notmuch 0.21). Please > - * use notmuch_query_search_threads_st instead. > - * > - */ > -NOTMUCH_DEPRECATED(4,3) > -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 > @@ -919,19 +906,6 @@ 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.3 (notmuch 0.21). Please use > - * notmuch_query_search_messages_st instead. > - * > - */ > -NOTMUCH_DEPRECATED(4,3) > -notmuch_messages_t * > -notmuch_query_search_messages (notmuch_query_t *query); > - > -/** > * Destroy a notmuch_query_t along with any associated resources. > * > * This will in turn destroy any notmuch_threads_t and > @@ -1016,18 +990,6 @@ notmuch_status_t > notmuch_query_count_messages_st (notmuch_query_t *query, unsigned int *count); > > /** > - * like notmuch_query_count_messages_st, but without a status return. > - * > - * May return 0 in the case of errors. > - * > - * @deprecated Deprecated since libnotmuch 4.3 (notmuch 0.21). Please > - * use notmuch_query_count_messages_st instead. > - */ > -NOTMUCH_DEPRECATED(4,3) > -unsigned int > -notmuch_query_count_messages (notmuch_query_t *query); > - > -/** > * Return the number of threads matching a search. > * > * This function performs a search and returns the number of unique thread IDs > @@ -1053,18 +1015,6 @@ notmuch_status_t > notmuch_query_count_threads_st (notmuch_query_t *query, unsigned *count); > > /** > - * like notmuch_query_count_threads, but without a status return. > - * > - * May return 0 in case of errors. > - * > - * @deprecated Deprecated as of libnotmuch 4.3 (notmuch 0.21). Please > - * use notmuch_query_count_threads_st instead. > - */ > -NOTMUCH_DEPRECATED(4,3) > -unsigned int > -notmuch_query_count_threads (notmuch_query_t *query); > - > -/** > * Get the thread ID of 'thread'. > * > * The returned string belongs to 'thread' and as such, should not be > diff --git a/test/T560-lib-error.sh b/test/T560-lib-error.sh > index 087c6bd7..a59eb74d 100755 > --- a/test/T560-lib-error.sh > +++ b/test/T560-lib-error.sh > @@ -302,9 +302,9 @@ backup_database > test_begin_subtest "Xapian exception counting messages" > cat c_head - c_tail <<'EOF' | test_C ${MAIL_DIR} > { > + int count; > notmuch_query_t *query=notmuch_query_create (db, "id:87ocn0qh6d.fsf@yoom.home.cworth.org"); > - int count = notmuch_query_count_messages (query); > - stat = (count == 0); > + stat = notmuch_query_count_messages_st (query, &count); > } > EOF > sed 's/^\(A Xapian exception [^:]*\):.*$/\1/' < OUTPUT > OUTPUT.clean > -- > 2.11.0 > > _______________________________________________ > notmuch mailing list > notmuch@notmuchmail.org > https://notmuchmail.org/mailman/listinfo/notmuch