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 AD361431FAF
\r
6 for <notmuch@notmuchmail.org>; Sun, 22 Apr 2012 05:06:34 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]
\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 WsqtvR1yIoAI for <notmuch@notmuchmail.org>;
\r
16 Sun, 22 Apr 2012 05:06:33 -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 07229431FAE
\r
21 for <notmuch@notmuchmail.org>; Sun, 22 Apr 2012 05:06:33 -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 67DEC4D42BD
\r
26 for <notmuch@notmuchmail.org>; Sun, 22 Apr 2012 14:06:28 +0200 (CEST)
\r
27 Received: by mail.jade-hamburg.de (Postfix, from userid 401)
\r
28 id D4163DF2A2; Sun, 22 Apr 2012 14:06:27 +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 96216DF2A0;
\r
33 Sun, 22 Apr 2012 14:06:22 +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 1SLvYb-00074l-4C; Sun, 22 Apr 2012 14:06:21 +0200
\r
37 Content-Type: text/plain; charset="utf-8"
\r
39 Content-Transfer-Encoding: quoted-printable
\r
40 To: Austin Clements <amdragon@MIT.EDU>,
\r
41 From: Justus Winter <4winter@informatik.uni-hamburg.de>
\r
42 In-Reply-To: <20120412170249.GG13549@mit.edu>
\r
44 <1332291311-28954-1-git-send-email-4winter@informatik.uni-hamburg.de>
\r
45 <1332291311-28954-8-git-send-email-4winter@informatik.uni-hamburg.de>
\r
46 <20120412170249.GG13549@mit.edu>
\r
47 Message-ID: <20120422120620.26225.40778@thinkbox.jade-hamburg.de>
\r
48 User-Agent: alot/0.3+
\r
49 Subject: Re: [PATCH 7/7] python: wrap and use notmuch_database_destroy as
\r
51 Date: Sun, 22 Apr 2012 14:06:20 +0200
\r
52 Cc: notmuch@notmuchmail.org
\r
53 X-BeenThere: notmuch@notmuchmail.org
\r
54 X-Mailman-Version: 2.1.13
\r
56 List-Id: "Use and development of the notmuch mail system."
\r
57 <notmuch.notmuchmail.org>
\r
58 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
59 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
60 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
61 List-Post: <mailto:notmuch@notmuchmail.org>
\r
62 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
63 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
64 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
65 X-List-Received-Date: Sun, 22 Apr 2012 12:06:34 -0000
\r
67 Quoting Austin Clements (2012-04-12 19:02:49)
\r
68 > Quoth Justus Winter on Mar 21 at 1:55 am:
\r
69 > > Adapt the go bindings to the notmuch_database_close split.
\r
76 > > Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
\r
78 > > bindings/python/notmuch/database.py | 17 +++++++++++++++--
\r
79 > > 1 files changed, 15 insertions(+), 2 deletions(-)
\r
82 > > diff --git a/bindings/python/notmuch/database.py b/bindings/python/notm=
\r
84 > > index 44d40fd..9a1896b 100644
\r
85 > > --- a/bindings/python/notmuch/database.py
\r
86 > > +++ b/bindings/python/notmuch/database.py
\r
87 > > @@ -218,9 +218,22 @@ class Database(object):
\r
88 > > _close.restype =3D None
\r
91 > > def close(self):
\r
92 > > - """Close and free the notmuch database if needed"""
\r
93 > > - if self._db is not None:
\r
95 > > + Closes the notmuch database.
\r
98 > > self._close(self._db)
\r
100 > > + _destroy =3D nmlib.notmuch_database_destroy
\r
101 > > + _destroy.argtypes =3D [NotmuchDatabaseP]
\r
102 > > + _destroy.restype =3D None
\r
104 > > + def destroy(self):
\r
107 > Should this be __del__? The existing __del__ is certainly wrong with
\r
108 > this change, since it only closes the database and doesn't free it. I
\r
109 > think this function is exactly what you want __del__ to be now.
\r
112 > (I think it also doesn't make sense to expose notmuch_database_destroy
\r
113 > as a general, public method since it will free all of the other C
\r
114 > objects out from under the bindings, resulting in exactly the double
\r
115 > free-type crashes that you're trying to avoid. It appears that none
\r
116 > of the other Python classes have a destroy method.)
\r
120 I'm going to send an rebased and updated patch series as a follow up
\r
121 to this message. Thanks for the input everyone :)
\r