1 Return-Path: <allan@lifeintegrity.com>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id DBE51431FBC
\r
6 for <notmuch@notmuchmail.org>; Sun, 29 Jan 2012 07:29:03 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]
\r
13 Received: from olra.theworths.org ([127.0.0.1])
\r
14 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id x+TmalQtPAfu for <notmuch@notmuchmail.org>;
\r
16 Sun, 29 Jan 2012 07:29:03 -0800 (PST)
\r
17 Received: from pawan.lifeintegrity.com (lifeintegrity.com [173.48.39.13])
\r
18 by olra.theworths.org (Postfix) with ESMTP id 1E3E2431FB6
\r
19 for <notmuch@notmuchmail.org>; Sun, 29 Jan 2012 07:29:02 -0800 (PST)
\r
20 Received: from vent.lifeintegrity.com (lifeintegrity.com [173.48.39.13])
\r
21 by submission.lifeintegrity.com (Postfix) with ESMTPS id D440A10F
\r
22 for <notmuch@notmuchmail.org>; Sun, 29 Jan 2012 15:29:01 +0000 (UTC)
\r
23 Received: by vent.lifeintegrity.com (Postfix, from userid 1000)
\r
24 id CAABF180393; Sun, 29 Jan 2012 15:29:01 +0000 (UTC)
\r
25 From: Allan Wind <allan_wind@lifeintegrity.com>
\r
26 To: notmuch@notmuchmail.org
\r
27 Subject: [PATCH] lib: update notmuch_tags_get examle to reflect api change
\r
28 Date: Sun, 29 Jan 2012 10:29:01 -0500
\r
29 Message-Id: <1327850941-12441-1-git-send-email-allan_wind@lifeintegrity.com>
\r
30 X-Mailer: git-send-email 1.7.2.5
\r
31 X-BeenThere: notmuch@notmuchmail.org
\r
32 X-Mailman-Version: 2.1.13
\r
34 List-Id: "Use and development of the notmuch mail system."
\r
35 <notmuch.notmuchmail.org>
\r
36 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
37 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
38 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
39 List-Post: <mailto:notmuch@notmuchmail.org>
\r
40 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
41 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
42 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
43 X-List-Received-Date: Sun, 29 Jan 2012 15:29:04 -0000
\r
45 The function notmuch_database_find_message_by_filename now requires a
\r
46 notmuch_message_t and returns a notmuch_status_t. This
\r
47 change was introduced with 02a3076711, LIBNOTMUCH_VERSION_MAJOR = 2,
\r
50 lib/notmuch.h | 21 +++++++++++----------
\r
51 1 files changed, 11 insertions(+), 10 deletions(-)
\r
53 diff --git a/lib/notmuch.h b/lib/notmuch.h
\r
54 index 7929fe7..5e6e449 100644
\r
57 @@ -941,21 +941,22 @@ notmuch_message_get_header (notmuch_message_t *message, const char *header);
\r
58 * Typical usage might be:
\r
60 * notmuch_message_t *message;
\r
61 + * notmuch_status_t status;
\r
62 * notmuch_tags_t *tags;
\r
65 - * message = notmuch_database_find_message (database, message_id);
\r
67 - * for (tags = notmuch_message_get_tags (message);
\r
68 - * notmuch_tags_valid (tags);
\r
69 - * notmuch_result_move_to_next (tags))
\r
71 - * tag = notmuch_tags_get (tags);
\r
73 + * status = notmuch_database_find_message (database, message_id, &message);
\r
74 + * if(!status && message) {
\r
75 + * for (tags = notmuch_message_get_tags (message);
\r
76 + * notmuch_tags_valid (tags);
\r
77 + * notmuch_result_move_to_next (tags))
\r
79 + * tag = notmuch_tags_get (tags);
\r
82 + * notmuch_message_destroy (message);
\r
85 - * notmuch_message_destroy (message);
\r
87 * Note that there's no explicit destructor needed for the
\r
88 * notmuch_tags_t object. (For consistency, we do provide a
\r
89 * notmuch_tags_destroy function, but there's no good reason to call
\r