[PyQt] Small bug in checkPointer in SIP

Phil Thompson phil at riverbankcomputing.com
Mon Jul 30 18:00:20 BST 2012


On Mon, 30 Jul 2012 10:26:50 +0530, Kovid Goyal <kovid at kovidgoyal.net>
wrote:
> Hi Phil,
> 
> I noticed the other day that checkPointer() in siplib.c.in has
> 
> PyErr_Format(PyExc_RuntimeError, (sipWasCreated(sw) ?
>                         "wrapped C/C++ object of %S has been deleted" :
>                         "super-class __init__() of %S was never
called"),
>                 (PyObject *)sw);
> 
> which should have a lower case %s and you probably want something like
> PyEval_GetFuncName((PyObject *)sw) or
> 
> PyObject_Repr((PyObject *)sw).
> 
> In the latter case, you'd have to check for a NULL return.
> 
> Kovid.

It's been fixed in the current snapshot.

Phil


More information about the PyQt mailing list