Re: [PATCH 1/2] python: add classes to wrap all notmuch_*_t types
Quoting James Westby (2011-12-02 00:32:30) On Thu, 01 Dec 2011 22:25:41 +0100, Sebastian Spaeth sebast...@sspaeth.de wrote: This strikes me as a rather good thing, so the patches went in. Hah, I've just seen this, and I'm going to guess that it fixes my problems too. ... I've tested and it seems to work, so my patch is unneeded witht his one. Huh, strange. My patch isn't supposed to change anything, it just enables the ctypes package to check whether the functions from libnotmuch are called with the right parameters, thus preventing mistakes when changing the python bindings in the future. Cheers, Justus .signature Description: Binary data ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch
Re: [PATCH 1/2] python: add classes to wrap all notmuch_*_t types
On Fri, 02 Dec 2011 13:35:11 +0100, Justus Winter 4win...@informatik.uni-hamburg.de wrote: Huh, strange. My patch isn't supposed to change anything, it just enables the ctypes package to check whether the functions from libnotmuch are called with the right parameters, thus preventing mistakes when changing the python bindings in the future. Where .restype is set to c_void_p ctypes spots this and returns it as int32. Where it's set to another callable (e.g. your custom types) it actually wraps the value by passing it to the callable and returning the result. Then, because your custom types are pointers, it stores them in an appropriate value, and also stops the storage being reused. I'll test again to make sure that I have this correct, but my tests yesterday certainly suggested that your patches fixed this. Thanks, James ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch
Re: [PATCH 1/2] python: add classes to wrap all notmuch_*_t types
On Fri, 02 Dec 2011 09:20:35 -0500, James Westby jw+deb...@jameswestby.net wrote: I'll test again to make sure that I have this correct, but my tests yesterday certainly suggested that your patches fixed this. Yep, segfaults a plenty dropping your second patch that go away again when it is applied once more. Thanks, James ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch
Re: [PATCH 1/2] python: add classes to wrap all notmuch_*_t types
Quoting James Westby (2011-12-03 00:24:18) On Fri, 02 Dec 2011 09:20:35 -0500, James Westby jw+deb...@jameswestby.net wrote: I'll test again to make sure that I have this correct, but my tests yesterday certainly suggested that your patches fixed this. Yep, segfaults a plenty dropping your second patch that go away again when it is applied once more. Happy to hear that :) Justus .signature Description: Binary data ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch
Re: [PATCH 1/2] python: add classes to wrap all notmuch_*_t types
On Mon, 28 Nov 2011 13:36:44 +0100, Justus Winter wrote: Well, quoting my commit message: Add type information to the ctypes._FuncPtr wrappers and use the wrapper classes instead of c_void_p for pointers to notmuch_*_t. This enables the ctypes library to type check parameters being handed to functions from the notmuch library. This strikes me as a rather good thing, so the patches went in. Sebastian pgp6adgNBIklt.pgp Description: PGP signature ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch
Re: [PATCH 1/2] python: add classes to wrap all notmuch_*_t types
On Thu, 01 Dec 2011 22:25:41 +0100, Sebastian Spaeth sebast...@sspaeth.de wrote: This strikes me as a rather good thing, so the patches went in. Hah, I've just seen this, and I'm going to guess that it fixes my problems too. ... I've tested and it seems to work, so my patch is unneeded witht his one. Thanks, James ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch
Re: [PATCH 1/2] python: add classes to wrap all notmuch_*_t types
Quoting Sebastian Spaeth (2011-11-02 08:25:53) On Mon, 10 Oct 2011 00:12:53 +0200, Justus Winter 4win...@informatik.uni-hamburg.de wrote: Signed-off-by: Justus Winter 4win...@informatik.uni-hamburg.de --- bindings/python/notmuch/globals.py | 38 +++- Hi there, catching up on email, sorry for the delay. I am not opposed to the change, but I fail to see any justification for a whole lot more complexity either. What was wrong with the previous approach? Well, quoting my commit message: Add type information to the ctypes._FuncPtr wrappers and use the wrapper classes instead of c_void_p for pointers to notmuch_*_t. This enables the ctypes library to type check parameters being handed to functions from the notmuch library. Justus .signature Description: Binary data ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch
Re: [PATCH 1/2] python: add classes to wrap all notmuch_*_t types
On Mon, 10 Oct 2011 00:12:53 +0200, Justus Winter 4win...@informatik.uni-hamburg.de wrote: Signed-off-by: Justus Winter 4win...@informatik.uni-hamburg.de --- bindings/python/notmuch/globals.py | 38 +++- Hi there, catching up on email, sorry for the delay. I am not opposed to the change, but I fail to see any justification for a whole lot more complexity either. What was wrong with the previous approach? Sebastian pgpvq2ntd7Ztf.pgp Description: PGP signature ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch