From fa8fde62639f0237cd39f4c06f3ff4e8c2ff5158 Mon Sep 17 00:00:00 2001 From: Mark McLoughlin Date: Wed, 9 Feb 2005 11:32:42 +0000 Subject: Fix for bug #154779 - Python signal handlers don't get executed while 2005-02-09 Mark McLoughlin 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. --- gobject/Makefile.am | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'gobject/Makefile.am') diff --git a/gobject/Makefile.am b/gobject/Makefile.am index a3e5e87..286626f 100644 --- a/gobject/Makefile.am +++ b/gobject/Makefile.am @@ -13,6 +13,7 @@ if PLATFORM_WIN32 common_ldflags += -no-undefined endif +gobject_la_CFLAGS = $(GLIB_CFLAGS) gobject_la_LDFLAGS = $(common_ldflags) -export-symbols-regex initgobject gobject_la_LIBADD = $(GLIB_LIBS) gobject_la_SOURCES = \ @@ -28,3 +29,7 @@ gobject_la_SOURCES = \ pygparamspec.c \ pygpointer.c \ pygtype.c + +if PLATFORM_WIN32 +gobject_la_CFLAGS += -DPLATFORM_WIN32 +endif -- cgit