Phil, there seems to be bug in SIP 4.8's exception wrapping. I noticed Python would segfault when importing a SIP-generated module which defined an exception, and when looking at the generated source I see a rather suspicious block of code.
For the attached SIP specification, the following block is generated for
instantiating the Python exception (in siptstcmodule.cpp):
if ((exceptionsTable[0] = PyErr_NewException((char
*)"tst.MyException",PyExc_Exception,NULL)) == NULL ||
PyDict_SetItemString(sipModuleDict,"MyException",exceptionsTable[0]) < 0)
return;
{
Py_DECREF(sip_sipmod);
Py_DECREF(sipModule);
SIP_MODULE_RETURN(0);
}
That "return;" looks a bit misplaced doesn't it? When I remove it, the
module no longer segfaults at least.
Arve
tst.sip
Description: Binary data
_______________________________________________ PyQt mailing list [email protected] http://www.riverbankcomputing.com/mailman/listinfo/pyqt
