On Wed, Jul 30, 2003 at 11:20:49AM -0400, John Ehresman wrote:
> 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)

To avoid dropped patches, it's the best idea to file a bug on
bugzilla.gnome.org and attach it there. That way we can make sure it's
not read with the D key when everybody's too busy to try it.

Take care,
--
Christian Reis, Senior Engineer, Async Open Source, Brazil.
http://async.com.br/~kiko/ | [+55 16] 261 2331 | NMFL
_______________________________________________
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