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 807FC431E64 for ; Mon, 30 Jan 2012 06:02:34 -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 yWfSK7CTR2b4 for ; Mon, 30 Jan 2012 06:02:34 -0800 (PST) Received: from pawan.lifeintegrity.com (lifeintegrity.com [173.48.39.13]) by olra.theworths.org (Postfix) with ESMTP id 12A52431FBC for ; Mon, 30 Jan 2012 06:02:34 -0800 (PST) Received: from vent.lifeintegrity.com (lifeintegrity.com [173.48.39.13]) by submission.lifeintegrity.com (Postfix) with ESMTPS id 6CCDF124 for ; Mon, 30 Jan 2012 14:02:33 +0000 (UTC) Received: by vent.lifeintegrity.com (Postfix, from userid 1000) id 64D20182116; Mon, 30 Jan 2012 14:02:33 +0000 (UTC) From: Allan Wind To: notmuch@notmuchmail.org Subject: [PATCH] lib: update notmuch_tags_get examle to reflect api change Date: Mon, 30 Jan 2012 09:02:33 -0500 Message-Id: <1327932153-22088-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: Mon, 30 Jan 2012 14:02:34 -0000 The function notmuch_database_find_message_by_filename now requires a notmuch_message_t and returns a notmuch_status_t. This change was introduced with 02a3076711, LIBNOTMUCH_VERSION_MAJOR = 2, version 0.9. --- 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