summaryrefslogtreecommitdiff
path: root/gtk/gtkwidget.override
diff options
context:
space:
mode:
authorJohan Dahlin <johan@src.gnome.org>2004-08-03 14:11:46 +0000
committerJohan Dahlin <johan@src.gnome.org>2004-08-03 14:11:46 +0000
commit354412b9f37fc8d59bd539d72d3294acf68436ce (patch)
treefe128f01b4dd511aa7643788d31317828c287465 /gtk/gtkwidget.override
parent111891a45e1bd9513d197710e0d99d78b177be9d (diff)
downloadpygtk-354412b9f37fc8d59bd539d72d3294acf68436ce.tar.gz
Clean up most functions here to have only one return path.
* gtk/pygtktreemodel.c: Clean up most functions here to have only one return path. * gobject/pygobject.c (pygobject_emit): Protect g_value_unset by UNBLOCK/BLOCK_THREADS since it might call pygobject_free which will result in a deadlock. * gobject/gobjectmodule.c (pyg_thread_init): New function, move thread initalization stuff in here. * All over the place: Kill pyg_block/unblock_threads and use PyGILState and Py_BEGIN/END_ALLOW_THREADS. unblock [code] block calls are replaced by Py_BEGIN/END and block [code] unblock calls are replaced by PyGILState.
Diffstat (limited to 'gtk/gtkwidget.override')
-rw-r--r--gtk/gtkwidget.override4
1 files changed, 2 insertions, 2 deletions
diff --git a/gtk/gtkwidget.override b/gtk/gtkwidget.override
index a4b32bec..759ec7ef 100644
--- a/gtk/gtkwidget.override
+++ b/gtk/gtkwidget.override
@@ -333,9 +333,9 @@ _wrap_gtk_widget__set_window(PyGObject *self, PyGObject *value, void *closure)
return -1;
}
- pyg_unblock_threads();
+ Py_BEGIN_ALLOW_THREADS;
GTK_WIDGET(self->obj)->window = g_object_ref(GDK_WINDOW(value->obj));
- pyg_block_threads();
+ Py_END_ALLOW_THREADS;
return 0;
}