Re: [PyQt] sip: how to make a python instance owned by C++ without using a parent

2012-08-15 Thread Mathias . Born
On 15.08.2012, 18:15:55 Phil Thompson wrote: > On Wed, 15 Aug 2012 11:55:47 +0200, mathias.b...@gmx.de wrote: >> On 15.08.2012, 11:05:42 Phil Thompson wrote: >>> I could change sipTransferTo() to do this if the owner was Py_None. At >>> the >>> moment this is undocumented behaviour. Would this be s

Re: [PyQt] sip: how to make a python instance owned by C++ without using a parent

2012-08-15 Thread Phil Thompson
On Wed, 15 Aug 2012 11:55:47 +0200, mathias.b...@gmx.de wrote: > On 15.08.2012, 11:05:42 Phil Thompson wrote: >> I could change sipTransferTo() to do this if the owner was Py_None. At >> the >> moment this is undocumented behaviour. Would this be sufficient? > > I believe so. Done in hg. Phil __

[PyQt] sip: extend exception support

2012-08-15 Thread Mathias . Born
Phil, sip can already propagate C++ exceptions into Python in cases where Python calls a C++ function which throws an exception. However, if I extend a C++ class in Python and call a corresponding (Python-)method in C++ via the wrapper, the sip generated wrapper code checks for a Python exception

Re: [PyQt] sip: how to make a python instance owned by C++ without using a parent

2012-08-15 Thread Mathias . Born
On 15.08.2012, 11:05:42 Phil Thompson wrote: > On Tue, 14 Aug 2012 23:47:51 +0200, mathias.b...@gmx.de wrote: >> Thanks for the answer. However, it appears I've not made myself >> clear enough. >> I don't want the C++ wrapper to be owned by Python; surely, I >> can achieve that with "sipTransferTo"

Re: [PyQt] sip: how to make a python instance owned by C++ without using a parent

2012-08-15 Thread Phil Thompson
On Tue, 14 Aug 2012 23:47:51 +0200, mathias.b...@gmx.de wrote: > Thanks for the answer. However, it appears I've not made myself > clear enough. > I don't want the C++ wrapper to be owned by Python; surely, I > can achieve that with "sipTransferTo". But nothing is done about the > Python part. When