Hi, I'm using Debian Sid, and my program crash since the last upgrade. The last upgrade installed PyQt 4.6 with SIP 4.9.
The crash is in sip_api_is_py_method(): if cls is not a PyTypeObject*, the dict value is a pointer to something is the memory, but not to a PyDictObject*. Attached patch fixes the crash. But the new PyQt/SIP introduces a regression: I replaced contextMenu and mousePressEvent for some objects, and it doesn't work anymore. I don't know if this issue (sip_api_is_py_method() crash) is related. -- Victor Stinner http://www.haypocalc.com/
--- sip4-qt3-4.9.old/siplib/siplib.c 2009-09-26 17:14:32.000000000 +0200 +++ sip4-qt3-4.9/siplib/siplib.c 2009-10-13 21:12:39.000000000 +0200 @@ -6030,8 +6030,11 @@ for (i = 0; i < PyTuple_GET_SIZE(mro); ++i) { PyObject *cls = PyTuple_GET_ITEM(mro, i); - PyObject *dict = ((PyTypeObject *)cls)->tp_dict; - + PyObject *dict; + if (PyClass_Check(cls)) + dict = ((PyClassObject *)cls)->cl_dict; + else + dict = ((PyTypeObject *)cls)->tp_dict; if (dict != NULL) { reimp = PyDict_GetItem(dict, mname_obj);
_______________________________________________ PyQt mailing list PyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt