[PATCH v2 04/10] go: add return status to database close method
authorPeter Wang <novalazy@gmail.com>
Wed, 16 Apr 2014 12:59:19 +0000 (22:59 +1000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 18:01:39 +0000 (10:01 -0800)
cd/5587ad4c2e06bc2f8f3f02e48295d530b31b84 [new file with mode: 0644]

diff --git a/cd/5587ad4c2e06bc2f8f3f02e48295d530b31b84 b/cd/5587ad4c2e06bc2f8f3f02e48295d530b31b84
new file mode 100644 (file)
index 0000000..c3a4f0f
--- /dev/null
@@ -0,0 +1,86 @@
+Return-Path: <novalazy@gmail.com>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id AF30F431FD5\r
+       for <notmuch@notmuchmail.org>; Wed, 16 Apr 2014 06:00:31 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.799\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5\r
+       tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+       FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id OrzZc5bn+KPR for <notmuch@notmuchmail.org>;\r
+       Wed, 16 Apr 2014 06:00:26 -0700 (PDT)\r
+Received: from mail-pb0-f53.google.com (mail-pb0-f53.google.com\r
+       [209.85.160.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 8F353431FC0\r
+       for <notmuch@notmuchmail.org>; Wed, 16 Apr 2014 05:59:59 -0700 (PDT)\r
+Received: by mail-pb0-f53.google.com with SMTP id rp16so10735513pbb.26\r
+       for <notmuch@notmuchmail.org>; Wed, 16 Apr 2014 05:59:58 -0700 (PDT)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
+       h=from:to:cc:subject:date:message-id:in-reply-to:references;\r
+       bh=8tA3b7WKaT9QvUBnyURbfeFstrbc6xQKX58VzmQEX3s=;\r
+       b=S4ldAiGBLfEocv3/0vkzlyJyMc3HA0PUH7Jznbtg5RVuqNa61PE54ZOvTgPSTDUQrz\r
+       18Uq6C8fW9AUl8HCaVDu9RWI7bxnuxSzKoOynw1Z3MnqdA1zh7thIATkTIOQm5300W6l\r
+       G9fNb0lX0Dqhy05tapuKoDLKOyh5YNWBgB3+JIcs68lhpGlx6ugcNrpGRFkshnlS+xh7\r
+       R0Ol+T3wcqBVHJxmk1J95IOneXqQQDQHd3N6QQPZkzzS8HR6qVn9JGAfReERQ6Fjxgix\r
+       /aUwOyjJob70IYzz2lR8HAg1pfU8pkmoQ2g0pFOUrB/Kdw4d4HBM/+6a32yJwyG5Lgme\r
+       u+ZA==\r
+X-Received: by 10.68.203.39 with SMTP id kn7mr8219175pbc.141.1397653198938;\r
+       Wed, 16 Apr 2014 05:59:58 -0700 (PDT)\r
+Received: from localhost (215.42.233.220.static.exetel.com.au.\r
+       [220.233.42.215]) by mx.google.com with ESMTPSA id\r
+       iq10sm46962618pbc.14.2014.04.16.05.59.56 for <multiple recipients>\r
+       (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\r
+       Wed, 16 Apr 2014 05:59:58 -0700 (PDT)\r
+From: Peter Wang <novalazy@gmail.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH v2 04/10] go: add return status to database close method\r
+Date: Wed, 16 Apr 2014 22:59:19 +1000\r
+Message-Id: <1397653165-15620-5-git-send-email-novalazy@gmail.com>\r
+X-Mailer: git-send-email 1.8.4\r
+In-Reply-To: <1397653165-15620-1-git-send-email-novalazy@gmail.com>\r
+References: <1397653165-15620-1-git-send-email-novalazy@gmail.com>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Wed, 16 Apr 2014 13:00:31 -0000\r
+\r
+Add return status to the Database.Close() method that calls\r
+notmuch_database_destroy.\r
+---\r
+ bindings/go/src/notmuch/notmuch.go | 4 ++--\r
+ 1 file changed, 2 insertions(+), 2 deletions(-)\r
+\r
+diff --git a/bindings/go/src/notmuch/notmuch.go b/bindings/go/src/notmuch/notmuch.go\r
+index 00bd53a..b9230ad 100644\r
+--- a/bindings/go/src/notmuch/notmuch.go\r
++++ b/bindings/go/src/notmuch/notmuch.go\r
+@@ -144,8 +144,8 @@ func OpenDatabase(path string, mode DatabaseMode) (*Database, Status) {\r
\r
+ /* Close the given notmuch database, freeing all associated\r
+  * resources. See notmuch_database_open. */\r
+-func (self *Database) Close() {\r
+-      C.notmuch_database_destroy(self.db)\r
++func (self *Database) Close() Status {\r
++      return Status(C.notmuch_database_destroy(self.db))\r
+ }\r
\r
+ /* Return the database path of the given database.\r
+-- \r
+1.8.4\r
+\r