Re: [PATCH v4 01/16] add util/search-path.{c, h} to test for executables in $PATH
[notmuch-archives.git] / cd / 379effc341e8ad5670a60c3c44a4f06630d49a
1 Return-Path: <teythoon@jade-hamburg.de>\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 4728B431FD7\r
6         for <notmuch@notmuchmail.org>; Tue, 20 Mar 2012 17:55:45 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
12         autolearn=disabled\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 hAjFiVZWdT4U for <notmuch@notmuchmail.org>;\r
16         Tue, 20 Mar 2012 17:55:44 -0700 (PDT)\r
17 Received: from mail.cryptobitch.de (cryptobitch.de [88.198.7.68])\r
18         (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))\r
19         (No client certificate requested)\r
20         by olra.theworths.org (Postfix) with ESMTPS id 64FC5431FCF\r
21         for <notmuch@notmuchmail.org>; Tue, 20 Mar 2012 17:55:44 -0700 (PDT)\r
22 Received: from mail.jade-hamburg.de (unknown [85.183.11.228])\r
23         (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))\r
24         (No client certificate requested)\r
25         by mail.cryptobitch.de (Postfix) with ESMTPSA id 05BA357678D\r
26         for <notmuch@notmuchmail.org>; Wed, 21 Mar 2012 01:55:43 +0100 (CET)\r
27 Received: by mail.jade-hamburg.de (Postfix, from userid 401)\r
28         id 67E93DF2A3; Wed, 21 Mar 2012 01:55:42 +0100 (CET)\r
29 Received: from thinkbox.jade-hamburg.de (unknown [10.1.1.153])\r
30         (using TLSv1 with cipher AES256-SHA (256/256 bits))\r
31         (No client certificate requested) (Authenticated sender: teythoon)\r
32         by mail.jade-hamburg.de (Postfix) with ESMTPSA id 8E887DF2A7;\r
33         Wed, 21 Mar 2012 01:55:27 +0100 (CET)\r
34 Received: from teythoon by thinkbox.jade-hamburg.de with local (Exim 4.77)\r
35         (envelope-from <teythoon@thinkbox.jade-hamburg.de>)\r
36         id 1SA9pl-0007vP-IX; Wed, 21 Mar 2012 01:55:25 +0100\r
37 From: Justus Winter <4winter@informatik.uni-hamburg.de>\r
38 To: notmuch@notmuchmail.org\r
39 Subject: [PATCH 7/7] python: wrap and use notmuch_database_destroy as\r
40         destructor\r
41 Date: Wed, 21 Mar 2012 01:55:11 +0100\r
42 Message-Id:\r
43  <1332291311-28954-8-git-send-email-4winter@informatik.uni-hamburg.de>\r
44 X-Mailer: git-send-email 1.7.9.1\r
45 In-Reply-To:\r
46  <1332291311-28954-1-git-send-email-4winter@informatik.uni-hamburg.de>\r
47 References:\r
48  <1332291311-28954-1-git-send-email-4winter@informatik.uni-hamburg.de>\r
49 X-BeenThere: notmuch@notmuchmail.org\r
50 X-Mailman-Version: 2.1.13\r
51 Precedence: list\r
52 List-Id: "Use and development of the notmuch mail system."\r
53         <notmuch.notmuchmail.org>\r
54 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
55         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
56 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
57 List-Post: <mailto:notmuch@notmuchmail.org>\r
58 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
59 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
60         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
61 X-List-Received-Date: Wed, 21 Mar 2012 00:55:45 -0000\r
62 \r
63 Adapt the go bindings to the notmuch_database_close split.\r
64 \r
65 Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>\r
66 ---\r
67  bindings/python/notmuch/database.py |   17 +++++++++++++++--\r
68  1 files changed, 15 insertions(+), 2 deletions(-)\r
69 \r
70 diff --git a/bindings/python/notmuch/database.py b/bindings/python/notmuch/database.py\r
71 index 44d40fd..9a1896b 100644\r
72 --- a/bindings/python/notmuch/database.py\r
73 +++ b/bindings/python/notmuch/database.py\r
74 @@ -218,9 +218,22 @@ class Database(object):\r
75      _close.restype = None\r
76  \r
77      def close(self):\r
78 -        """Close and free the notmuch database if needed"""\r
79 -        if self._db is not None:\r
80 +        '''\r
81 +        Closes the notmuch database.\r
82 +        '''\r
83 +        if self._db:\r
84              self._close(self._db)\r
85 +\r
86 +    _destroy = nmlib.notmuch_database_destroy\r
87 +    _destroy.argtypes = [NotmuchDatabaseP]\r
88 +    _destroy.restype = None\r
89 +\r
90 +    def destroy(self):\r
91 +        '''\r
92 +        Destroys the notmuch database.\r
93 +        '''\r
94 +        if self._db:\r
95 +            self._destroy(self._db)\r
96              self._db = None\r
97  \r
98      def __enter__(self):\r
99 -- \r
100 1.7.9.1\r
101 \r