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 15D76431FB6
\r
6 for <notmuch@notmuchmail.org>; Sat, 28 Jan 2012 14:46:43 -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 JISLj6UWbmGG for <notmuch@notmuchmail.org>;
\r
16 Sat, 28 Jan 2012 14:46:42 -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 9C506431FAE
\r
19 for <notmuch@notmuchmail.org>; Sat, 28 Jan 2012 14:46:42 -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 4A41E90
\r
22 for <notmuch@notmuchmail.org>; Sat, 28 Jan 2012 22:46:42 +0000 (UTC)
\r
23 Received: by vent.lifeintegrity.com (Postfix, from userid 1000)
\r
24 id 3E7B6182F7F; Sat, 28 Jan 2012 22:46:42 +0000 (UTC)
\r
25 From: Allan Wind <allan_wind@lifeintegrity.com>
\r
26 To: notmuch@notmuchmail.org
\r
27 Subject: [PATCH] lib: notmuch_tags_get example was not updated to reflect api
\r
29 Date: Sat, 28 Jan 2012 17:46:42 -0500
\r
30 Message-Id: <1327790802-15353-1-git-send-email-allan_wind@lifeintegrity.com>
\r
31 X-Mailer: git-send-email 1.7.2.5
\r
32 X-BeenThere: notmuch@notmuchmail.org
\r
33 X-Mailman-Version: 2.1.13
\r
35 List-Id: "Use and development of the notmuch mail system."
\r
36 <notmuch.notmuchmail.org>
\r
37 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
38 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
39 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
40 List-Post: <mailto:notmuch@notmuchmail.org>
\r
41 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
42 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
43 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
44 X-List-Received-Date: Sat, 28 Jan 2012 22:46:43 -0000
\r
47 lib/notmuch.h | 21 +++++++++++----------
\r
48 1 files changed, 11 insertions(+), 10 deletions(-)
\r
50 diff --git a/lib/notmuch.h b/lib/notmuch.h
\r
51 index 7929fe7..5e6e449 100644
\r
54 @@ -941,21 +941,22 @@ notmuch_message_get_header (notmuch_message_t *message, const char *header);
\r
55 * Typical usage might be:
\r
57 * notmuch_message_t *message;
\r
58 + * notmuch_status_t status;
\r
59 * notmuch_tags_t *tags;
\r
62 - * message = notmuch_database_find_message (database, message_id);
\r
64 - * for (tags = notmuch_message_get_tags (message);
\r
65 - * notmuch_tags_valid (tags);
\r
66 - * notmuch_result_move_to_next (tags))
\r
68 - * tag = notmuch_tags_get (tags);
\r
70 + * status = notmuch_database_find_message (database, message_id, &message);
\r
71 + * if(!status && message) {
\r
72 + * for (tags = notmuch_message_get_tags (message);
\r
73 + * notmuch_tags_valid (tags);
\r
74 + * notmuch_result_move_to_next (tags))
\r
76 + * tag = notmuch_tags_get (tags);
\r
79 + * notmuch_message_destroy (message);
\r
82 - * notmuch_message_destroy (message);
\r
84 * Note that there's no explicit destructor needed for the
\r
85 * notmuch_tags_t object. (For consistency, we do provide a
\r
86 * notmuch_tags_destroy function, but there's no good reason to call
\r