summaryrefslogtreecommitdiffstats
path: root/gobject/pygobject-private.h
diff options
context:
space:
mode:
authorMark McLoughlin <mark@skynet.ie>2005-02-09 11:32:42 +0000
committerMark McLoughlin <markmc@src.gnome.org>2005-02-09 11:32:42 +0000
commitfa8fde62639f0237cd39f4c06f3ff4e8c2ff5158 (patch)
tree97e3ddcd8d3082c809fad2e9c8d21c1f24cbb3f5 /gobject/pygobject-private.h
parentf0ff018ae9f5fbb5223ec4fbc70092f185ff83d5 (diff)
downloadpygobject-fa8fde62639f0237cd39f4c06f3ff4e8c2ff5158.tar.gz
pygobject-fa8fde62639f0237cd39f4c06f3ff4e8c2ff5158.tar.xz
pygobject-fa8fde62639f0237cd39f4c06f3ff4e8c2ff5158.zip
Fix for bug #154779 - Python signal handlers don't get executed while
2005-02-09 Mark McLoughlin <mark@skynet.ie> Fix for bug #154779 - Python signal handlers don't get executed while you're sitting in the main loop. * gobject/pygmainloop.c: (pyg_save_current_main_loop), (pyg_restore_current_main_loop), (pyg_get_current_main_loop): functions for keeping track of the currently running main loop. A version using TLS and another using a global variable, depending on whether DISABLE_THREADING is defined (pyg_signal_watch_prepare), (pyg_signal_watch_check), (pyg_signal_watch_dispatch), (pyg_signal_watch_new): a GSource which runs the python signal handlers whenever the mainloop is interrupted by signal delivery. (pyg_main_loop_new), (pyg_main_loop_dealloc): add and remove the source. (_wrap_g_main_loop_run): push/pop the currently running main loop. * gobject/pygobject-private.h: add a pointer for the source to PyGMainLoop. * gobject/Makefile.am: add -DPLATFORM_WIN32 to cflags if building on Windows.
Diffstat (limited to 'gobject/pygobject-private.h')
-rw-r--r--gobject/pygobject-private.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/gobject/pygobject-private.h b/gobject/pygobject-private.h
index d826f92..c5852e8 100644
--- a/gobject/pygobject-private.h
+++ b/gobject/pygobject-private.h
@@ -145,6 +145,7 @@ extern PyObject * pyg_enum_from_gtype (GType gtype,
typedef struct {
PyObject_HEAD
GMainLoop *loop;
+ GSource *signal_source;
} PyGMainLoop;
extern PyTypeObject PyGMainLoop_Type;