[PATCH] convert bitmap to unsigned char
[notmuch-archives.git] / c0 / 75203aeca42dbfb209c74f7464027b239df327
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 BDE33431FD7\r
6         for <notmuch@notmuchmail.org>; Sun, 22 Apr 2012 05:08:55 -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 J7DHpRNB5WSo for <notmuch@notmuchmail.org>;\r
16         Sun, 22 Apr 2012 05:08:55 -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 3B193431FD0\r
21         for <notmuch@notmuchmail.org>; Sun, 22 Apr 2012 05:08:55 -0700 (PDT)\r
22 Received: from mail.jade-hamburg.de (mail.jade-hamburg.de [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 B34475836F8\r
26         for <notmuch@notmuchmail.org>; Sun, 22 Apr 2012 14:08:53 +0200 (CEST)\r
27 Received: by mail.jade-hamburg.de (Postfix, from userid 401)\r
28         id 23226DF2A2; Sun, 22 Apr 2012 14:08:53 +0200 (CEST)\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 327E1DF2A6;\r
33         Sun, 22 Apr 2012 14:08:29 +0200 (CEST)\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 1SLvad-0007B9-GV; Sun, 22 Apr 2012 14:08:27 +0200\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: Sun, 22 Apr 2012 14:07:57 +0200\r
42 Message-Id:\r
43  <1335096477-27537-7-git-send-email-4winter@informatik.uni-hamburg.de>\r
44 X-Mailer: git-send-email 1.7.10\r
45 In-Reply-To:\r
46  <1335096477-27537-1-git-send-email-4winter@informatik.uni-hamburg.de>\r
47 References: <20120422120620.26225.40778@thinkbox.jade-hamburg.de>\r
48         <1335096477-27537-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: Sun, 22 Apr 2012 12:08:56 -0000\r
62 \r
63 Adapt the python 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 |   14 ++++++++++----\r
68  1 file changed, 10 insertions(+), 4 deletions(-)\r
69 \r
70 diff --git a/bindings/python/notmuch/database.py b/bindings/python/notmuch/database.py\r
71 index 44d40fd..268e952 100644\r
72 --- a/bindings/python/notmuch/database.py\r
73 +++ b/bindings/python/notmuch/database.py\r
74 @@ -161,8 +161,13 @@ class Database(object):\r
75          else:\r
76              self.create(path)\r
77  \r
78 +    _destroy = nmlib.notmuch_database_destroy\r
79 +    _destroy.argtypes = [NotmuchDatabaseP]\r
80 +    _destroy.restype = None\r
81 +\r
82      def __del__(self):\r
83 -        self.close()\r
84 +        if self._db:\r
85 +            self._destroy(self._db)\r
86  \r
87      def _assert_db_is_initialized(self):\r
88          """Raises :exc:`NotInitializedError` if self._db is `None`"""\r
89 @@ -218,10 +223,11 @@ class Database(object):\r
90      _close.restype = None\r
91  \r
92      def close(self):\r
93 -        """Close and free the notmuch database if needed"""\r
94 -        if self._db is not None:\r
95 +        '''\r
96 +        Closes the notmuch database.\r
97 +        '''\r
98 +        if self._db:\r
99              self._close(self._db)\r
100 -            self._db = None\r
101  \r
102      def __enter__(self):\r
103          '''\r
104 -- \r
105 1.7.10\r
106 \r