Here's a patch for a segfault that I managed to trigger once. I can't seem to reproduce how I trigged it, but I'm fairly sure the patch is correct. The problem is that without the patch, the ob_type slot of PyGObjectDoc_Type in pygtype.c is never set to &PyType_Type.

John

Index: pygtype.c
===================================================================
RCS file: /home/cvs/src/ide/external/gtk2/pygtk/pygtype.c,v
retrieving revision 1.1
diff -u -r1.1 pygtype.c
--- pygtype.c   29 Mar 2003 00:06:22 -0000      1.1
+++ pygtype.c   30 Jul 2003 15:25:43 -0000
@@ -1107,6 +1107,9 @@
 {
     static PyObject *doc_descr = NULL;

+    if (PyGObjectDoc_Type.ob_type == NULL)
+       PyGObjectDoc_Type.ob_type = &PyType_Type;
+
     if (!doc_descr) {
        doc_descr = PyObject_NEW(PyObject, &PyGObjectDoc_Type);
        if (doc_descr == NULL)

_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to