From: Jani Nikula <jani@nikula.org>
To: Allan Wind <allan_wind@lifeintegrity.com>
Cc: notmuch@notmuchmail.org
Subject: Re: [PATCH] lib: notmuch_tags_get example was not updated to reflect api change
Date: Sun, 29 Jan 2012 08:54:35 +0200 [thread overview]
Message-ID: <CAB+hUn-tq7-frPcKA2Z8zW7NbAvr=4sjic9hGpe-wBw_r68NOQ@mail.gmail.com> (raw)
In-Reply-To: <1327790802-15353-1-git-send-email-allan_wind@lifeintegrity.com>
[-- Attachment #1: Type: text/plain, Size: 1938 bytes --]
The subject should be about what this patch does, like "lib: update
notmuch_tags_get example to reflect api change"
On Jan 29, 2012 12:46 AM, "Allan Wind" <allan_wind@lifeintegrity.com> wrote:
>
And preferably you would describe here what the api change was.
> ---
> lib/notmuch.h | 21 +++++++++++----------
> 1 files changed, 11 insertions(+), 10 deletions(-)
>
> diff --git a/lib/notmuch.h b/lib/notmuch.h
> index 7929fe7..5e6e449 100644
> --- a/lib/notmuch.h
> +++ b/lib/notmuch.h
> @@ -941,21 +941,22 @@ notmuch_message_get_header (notmuch_message_t
*message, const char *header);
> * Typical usage might be:
> *
> * notmuch_message_t *message;
> + * notmuch_status_t status;
> * notmuch_tags_t *tags;
> * const char *tag;
> *
> - * message = notmuch_database_find_message (database, message_id);
> - *
> - * for (tags = notmuch_message_get_tags (message);
> - * notmuch_tags_valid (tags);
> - * notmuch_result_move_to_next (tags))
> - * {
> - * tag = notmuch_tags_get (tags);
> - * ....
> + * status = notmuch_database_find_message (database, message_id,
&message);
> + * if(!status && message) {
> + * for (tags = notmuch_message_get_tags (message);
> + * notmuch_tags_valid (tags);
> + * notmuch_result_move_to_next (tags))
> + * {
> + * tag = notmuch_tags_get (tags);
> + * ....
> + * }
> + * notmuch_message_destroy (message);
> * }
> *
> - * notmuch_message_destroy (message);
> - *
> * Note that there's no explicit destructor needed for the
> * notmuch_tags_t object. (For consistency, we do provide a
> * notmuch_tags_destroy function, but there's no good reason to call
> --
> 1.7.2.5
>
> _______________________________________________
> notmuch mailing list
> notmuch@notmuchmail.org
> http://notmuchmail.org/mailman/listinfo/notmuch
[-- Attachment #2: Type: text/html, Size: 2679 bytes --]
prev parent reply other threads:[~2012-01-29 6:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-28 22:46 [PATCH] lib: notmuch_tags_get example was not updated to reflect api change Allan Wind
2012-01-29 6:54 ` Jani Nikula [this message]
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='CAB+hUn-tq7-frPcKA2Z8zW7NbAvr=4sjic9hGpe-wBw_r68NOQ@mail.gmail.com' \
--to=jani@nikula.org \
--cc=allan_wind@lifeintegrity.com \
--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).