SOURCES (DEVEL): python-pygobject-threads-init.patch (NEW) - don't crash fo...

patrys patrys at pld-linux.org
Thu Aug 28 15:00:49 CEST 2008


Author: patrys                       Date: Thu Aug 28 13:00:49 2008 GMT
Module: SOURCES                       Tag: DEVEL
---- Log message:
- don't crash for old API

---- Files affected:
SOURCES:
   python-pygobject-threads-init.patch (NONE -> 1.1.2.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/python-pygobject-threads-init.patch
diff -u /dev/null SOURCES/python-pygobject-threads-init.patch:1.1.2.1
--- /dev/null	Thu Aug 28 15:00:50 2008
+++ SOURCES/python-pygobject-threads-init.patch	Thu Aug 28 15:00:44 2008
@@ -0,0 +1,32 @@
+diff -up pygobject-2.15.2/glib/pyglib.c.thread-init pygobject-2.15.2/glib/pyglib.c
+diff -up pygobject-2.15.2/gobject/gobjectmodule.c.thread-init pygobject-2.15.2/gobject/gobjectmodule.c
+--- pygobject-2.15.2/gobject/gobjectmodule.c.thread-init	2008-07-26 06:21:44.000000000 -0400
++++ pygobject-2.15.2/gobject/gobjectmodule.c	2008-08-07 15:06:01.000000000 -0400
+@@ -1944,6 +1944,18 @@ pyg_threads_init (PyObject *unused, PyOb
+     return Py_None;
+ }
+ 
++/* Only for backwards compatibility */
++int
++pygobject_enable_threads(void)
++{
++    if (!pyglib_enable_threads())
++      return -1;
++
++    pygobject_api_functions.threads_enabled = TRUE;
++
++    return 0;
++}
++
+ static PyObject *
+ pyg_signal_accumulator_true_handled(PyObject *unused, PyObject *args)
+ {
+@@ -2639,7 +2648,7 @@ struct _PyGObject_Functions pygobject_ap
+   pyg_flags_from_gtype,
+ 
+   FALSE, /* threads_enabled */
+-  pyglib_enable_threads,
++  pygobject_enable_threads,
+   pygobject_gil_state_ensure,
+   pygobject_gil_state_release,
+   pyg_register_class_init,
================================================================


More information about the pld-cvs-commit mailing list