From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 15D76431FB6 for ; Sat, 28 Jan 2012 14:46:43 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] 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 JISLj6UWbmGG for ; Sat, 28 Jan 2012 14:46:42 -0800 (PST) Received: from pawan.lifeintegrity.com (lifeintegrity.com [173.48.39.13]) by olra.theworths.org (Postfix) with ESMTP id 9C506431FAE for ; Sat, 28 Jan 2012 14:46:42 -0800 (PST) Received: from vent.lifeintegrity.com (lifeintegrity.com [173.48.39.13]) by submission.lifeintegrity.com (Postfix) with ESMTPS id 4A41E90 for ; Sat, 28 Jan 2012 22:46:42 +0000 (UTC) Received: by vent.lifeintegrity.com (Postfix, from userid 1000) id 3E7B6182F7F; Sat, 28 Jan 2012 22:46:42 +0000 (UTC) From: Allan Wind To: notmuch@notmuchmail.org Subject: [PATCH] lib: notmuch_tags_get example was not updated to reflect api change Date: Sat, 28 Jan 2012 17:46:42 -0500 Message-Id: <1327790802-15353-1-git-send-email-allan_wind@lifeintegrity.com> X-Mailer: git-send-email 1.7.2.5 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: Sat, 28 Jan 2012 22:46:43 -0000 --- 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