pygobject r1057 - in trunk: . gio



Author: jmatthew
Date: Wed Apr  8 21:54:42 2009
New Revision: 1057
URL: http://svn.gnome.org/viewvc/pygobject?rev=1057&view=rev

Log:
2009-04-09  Jonathan Matthew  <jonathan d14n org>

	Bug 575781 â pyg_notify_free needs to ensure it has GIL before calling
	Py_XDECREF

	* gio/gio.override:  Ensure we're holding the GIL before potentially
	destroying the callback and data.


Modified:
   trunk/ChangeLog
   trunk/gio/gio.override

Modified: trunk/gio/gio.override
==============================================================================
--- trunk/gio/gio.override	(original)
+++ trunk/gio/gio.override	Wed Apr  8 21:54:42 2009
@@ -145,8 +145,12 @@
 {
     if (notify) {
         if (notify->referenced) {
+            PyGILState_STATE state;
+
+            state = pyg_gil_state_ensure();
             Py_XDECREF(notify->callback);
             Py_XDECREF(notify->data);
+            pyg_gil_state_release(state);
         }
 
         if (notify->buffer)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]