From: Jani Nikula Date: Sun, 3 Nov 2013 12:24:46 +0000 (+0200) Subject: [PATCH v2 06/11] lib: update documentation of callback functions for database_compact... X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=439461261a14b0a3d4f7ee2beb09062e40ad6a8e;p=notmuch-archives.git [PATCH v2 06/11] lib: update documentation of callback functions for database_compact and database_upgrade. --- diff --git a/29/d096eaa9cf958eb5407fd832bf10e270c4ec28 b/29/d096eaa9cf958eb5407fd832bf10e270c4ec28 new file mode 100644 index 000000000..b47fbe4be --- /dev/null +++ b/29/d096eaa9cf958eb5407fd832bf10e270c4ec28 @@ -0,0 +1,106 @@ +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 32637431FDE + for ; Sun, 3 Nov 2013 04:25:32 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" +X-Spam-Flag: NO +X-Spam-Score: -0.7 +X-Spam-Level: +X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 + tests=[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 8N7SuIqN+a1Y for ; + Sun, 3 Nov 2013 04:25:26 -0800 (PST) +Received: from mail-ea0-f172.google.com (mail-ea0-f172.google.com + [209.85.215.172]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 057E6431E82 + for ; Sun, 3 Nov 2013 04:25:10 -0800 (PST) +Received: by mail-ea0-f172.google.com with SMTP id r16so2880341ead.17 + for ; Sun, 03 Nov 2013 04:25:09 -0800 (PST) +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=1e100.net; s=20130820; + h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to + :references:in-reply-to:references; + bh=LOx8jpN1NtyKVEa/IAyIQS8usHuCQPFZ8+nVGR2R/HA=; + b=ZctB1PG0Dtv24cBo2fiQbZxtu5uQEC5qJX/5dLA0gyhaDmOXrTu3T+QBX61psnBk9Y + gf1bG6n6kNKBCu44TYaDiOkJrlAj4Pv4vsEbGRx3ZEeW+qlMhOaWYqP6drpCUlSmDNl0 + v7zRN8PEzHQd8TIM3WyOUUbneS4YfI+8T03IWz6mNOTC1WnjajALwSM75qFtJAm+5wE3 + yppgZxNH70BwR1ADchrJsqlX11mWbeJc01jYqXrx9NexgKveA3EwODg+Tu0okHX7+gKl + k6LHUgUOYV7RPxQVv/HUrEPBhWe3SW6T1j5y7l7n9sgxfEDPGA7WLBO4zbBKVKE8GT66 + POZQ== +X-Gm-Message-State: + ALoCoQklQS1dmdfQ4Rmb1Qk5UuS4BRi2T7odE0PHxJu+51f3/x1C5pZdd8z0GGng+3LSkUhBo3ho +X-Received: by 10.15.100.198 with SMTP id bn46mr12403978eeb.11.1383481509839; + Sun, 03 Nov 2013 04:25:09 -0800 (PST) +Received: from localhost (dsl-hkibrasgw2-58c36f-91.dhcp.inet.fi. + [88.195.111.91]) + by mx.google.com with ESMTPSA id i47sm9567313eem.5.2013.11.03.04.25.08 + for + (version=TLSv1.2 cipher=RC4-SHA bits=128/128); + Sun, 03 Nov 2013 04:25:09 -0800 (PST) +From: Jani Nikula +To: notmuch@notmuchmail.org +Subject: [PATCH v2 06/11] lib: update documentation of callback functions for + database_compact and database_upgrade. +Date: Sun, 3 Nov 2013 14:24:46 +0200 +Message-Id: + <3ccb768e0da07e53e37d9fd593855719ba900c1c.1383481295.git.jani@nikula.org> +X-Mailer: git-send-email 1.8.4.rc3 +In-Reply-To: +References: +In-Reply-To: +References: +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, 03 Nov 2013 12:25:32 -0000 + +From: David Bremner + +Compact was missing callback documentation entirely, and upgrade did not discuss the +closure parameter. +--- + lib/notmuch.h | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/lib/notmuch.h b/lib/notmuch.h +index cd301a4..82fd599 100644 +--- a/lib/notmuch.h ++++ b/lib/notmuch.h +@@ -227,6 +227,9 @@ typedef void (*notmuch_compact_status_cb_t)(const char *message, void *closure); + * The database will be opened with NOTMUCH_DATABASE_MODE_READ_WRITE + * during the compaction process to ensure no writes are made. + * ++ * If the optional callback function 'status_cb' is non-NULL, it will ++ * be called with diagnostic and informational messages. The argument ++ * 'closure' is passed verbatim to any callback invoked. + */ + notmuch_status_t + notmuch_database_compact (const char* path, +@@ -270,7 +273,8 @@ notmuch_database_needs_upgrade (notmuch_database_t *database); + * provide progress indication to the user. If non-NULL it will be + * called periodically with 'progress' as a floating-point value in + * the range of [0.0 .. 1.0] indicating the progress made so far in +- * the upgrade process. ++ * the upgrade process. The argument 'closure' is passed verbatim to ++ * any callback invoked. + */ + notmuch_status_t + notmuch_database_upgrade (notmuch_database_t *database, +-- +1.8.4.rc3 +