From: Jani Nikula <jani@nikula.org>
To: David Bremner <david@tethera.net>, notmuch@notmuchmail.org
Subject: Re: [PATCH] lib: remove notmuch_query_{count, search}_{threads, messages}
Date: Sat, 25 Feb 2017 21:26:22 +0200 [thread overview]
Message-ID: <87h93i6pi9.fsf@nikula.org> (raw)
In-Reply-To: <20170223014656.9500-1-david@tethera.net>
On Wed, 22 Feb 2017, David Bremner <david@tethera.net> 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
next prev parent reply other threads:[~2017-02-25 19:26 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-23 1:46 [PATCH] lib: remove notmuch_query_{count,search}_{threads,messages} David Bremner
2017-02-25 19:26 ` Jani Nikula [this message]
2017-02-25 20:06 ` [PATCH] lib: remove notmuch_query_{count, search}_{threads, messages} David Bremner
2017-02-26 9:07 ` Tomi Ollila
2017-02-26 21:21 ` v2 remove notmuch_query_{count,search}_{threads,messages} David Bremner
2017-02-26 21:21 ` [PATCH 1/6] lib: bump SONAME to libnotmuch5 David Bremner
2017-03-22 11:53 ` David Bremner
2017-02-26 21:21 ` [PATCH 2/6] lib: replace n_query_search_threads with status returning version David Bremner
2017-02-26 21:21 ` [PATCH 3/6] lib: replace deprecated n_q_search_messages " David Bremner
2017-02-26 21:21 ` [PATCH 4/6] fixup! " David Bremner
2017-02-26 21:21 ` [PATCH 5/6] lib: replace deprecated n_q_count_messages " David Bremner
2017-02-26 21:21 ` [PATCH 6/6] lib: replace deprecated n_q_count_threads " David Bremner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87h93i6pi9.fsf@nikula.org \
--to=jani@nikula.org \
--cc=david@tethera.net \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).