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 F0F1A431FD2 for ; Sat, 28 Jan 2012 22:54:36 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.699 X-Spam-Level: X-Spam-Status: No, score=-0.699 tagged_above=-999 required=5 tests=[HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7] 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 HLLGpG1Xsbvb for ; Sat, 28 Jan 2012 22:54:36 -0800 (PST) Received: from mail-pw0-f53.google.com (mail-pw0-f53.google.com [209.85.160.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 1D3C2431FB6 for ; Sat, 28 Jan 2012 22:54:36 -0800 (PST) Received: by pbbb4 with SMTP id b4so3793695pbb.26 for ; Sat, 28 Jan 2012 22:54:35 -0800 (PST) MIME-Version: 1.0 Received: by 10.68.75.229 with SMTP id f5mr29493587pbw.110.1327820075234; Sat, 28 Jan 2012 22:54:35 -0800 (PST) Received: by 10.68.236.137 with HTTP; Sat, 28 Jan 2012 22:54:35 -0800 (PST) Received: by 10.68.236.137 with HTTP; Sat, 28 Jan 2012 22:54:35 -0800 (PST) In-Reply-To: <1327790802-15353-1-git-send-email-allan_wind@lifeintegrity.com> References: <1327790802-15353-1-git-send-email-allan_wind@lifeintegrity.com> Date: Sun, 29 Jan 2012 08:54:35 +0200 Message-ID: Subject: Re: [PATCH] lib: notmuch_tags_get example was not updated to reflect api change From: Jani Nikula To: Allan Wind Content-Type: multipart/alternative; boundary=f46d041a439ee8f3d204b7a533a6 Cc: notmuch@notmuchmail.org 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: Sun, 29 Jan 2012 06:54:37 -0000 --f46d041a439ee8f3d204b7a533a6 Content-Type: text/plain; charset=UTF-8 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" 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 --f46d041a439ee8f3d204b7a533a6 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


The subject should be about what this patch does, like "lib: update no= tmuch_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.

> ---
> =C2=A0lib/notmuch.h | =C2=A0 21 +++++++++++----------
> =C2=A01 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 *m= essage, const char *header);
> =C2=A0* Typical usage might be:
> =C2=A0*
> =C2=A0* =C2=A0 =C2=A0 notmuch_message_t *message;
> + * =C2=A0 =C2=A0 notmuch_status_t status;
> =C2=A0* =C2=A0 =C2=A0 notmuch_tags_t *tags;
> =C2=A0* =C2=A0 =C2=A0 const char *tag;
> =C2=A0*
> - * =C2=A0 =C2=A0 message =3D notmuch_database_find_message (database,= message_id);
> - *
> - * =C2=A0 =C2=A0 for (tags =3D notmuch_message_get_tags (message); > - * =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0notmuch_tags_valid (tags);
> - * =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0notmuch_result_move_to_next (tag= s))
> - * =C2=A0 =C2=A0 {
> - * =C2=A0 =C2=A0 =C2=A0 =C2=A0 tag =3D notmuch_tags_get (tags);
> - * =C2=A0 =C2=A0 =C2=A0 =C2=A0 ....
> + * =C2=A0 =C2=A0 status =3D notmuch_database_find_message (database, = message_id, &message);
> + * =C2=A0 =C2=A0 if(!status && message) {
> + * =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0for (tags =3D notmuch_message_ge= t_tags (message);
> + * =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 notmuch_tags_vali= d (tags);
> + * =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 notmuch_result_mo= ve_to_next (tags))
> + * =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0{
> + * =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 tag =3D notmuch_t= ags_get (tags);
> + * =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ....
> + * =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0}
> + * =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0notmuch_message_destroy (message= );
> =C2=A0* =C2=A0 =C2=A0 }
> =C2=A0*
> - * =C2=A0 =C2=A0 notmuch_message_destroy (message);
> - *
> =C2=A0* Note that there's no explicit destructor needed for the > =C2=A0* notmuch_tags_t object. (For consistency, we do provide a
> =C2=A0* notmuch_tags_destroy function, but there's no good reason = to call
> --
> 1.7.2.5
>
> _______________________________________________
> notmuch mailing list
> notmuch@notmuchmail.org=
> http://not= muchmail.org/mailman/listinfo/notmuch

--f46d041a439ee8f3d204b7a533a6--