summaryrefslogtreecommitdiff
path: root/gmain.c
diff options
context:
space:
mode:
authorTim Janik <timj@src.gnome.org>1999-01-17 05:03:18 +0000
committerTim Janik <timj@src.gnome.org>1999-01-17 05:03:18 +0000
commit37f659ec1127781395c3523244399514ba99eab7 (patch)
tree31b597e7e58c8d3875683ee7a4b45d2c1b3eef65 /gmain.c
parent08425ac4c2fce32d96295e3fefe31f1ddcc17db0 (diff)
reentrancy fixups
Diffstat (limited to 'gmain.c')
-rw-r--r--gmain.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/gmain.c b/gmain.c
index 9da4fa08b..0bcd51abd 100644
--- a/gmain.c
+++ b/gmain.c
@@ -421,6 +421,12 @@ g_source_destroy_func (GHookList *hook_list,
G_LOCK (main_loop);
}
+static void
+g_source_noop (GHookList *hook_list,
+ GHook *hook)
+{
+}
+
guint
g_source_add (gint priority,
gboolean can_recurse,
@@ -437,7 +443,8 @@ g_source_add (gint priority,
if (!source_list.is_setup)
g_hook_list_init (&source_list, sizeof(GSource));
- source_list.hook_destroy = g_source_destroy_func;
+ source_list.hook_destroy = g_source_noop;
+ source_list.hook_free = g_source_destroy_func;
source = (GSource *)g_hook_alloc (&source_list);
source->priority = priority;
@@ -1116,7 +1123,7 @@ g_timeout_dispatch (gpointer source_data,
{
GTimeoutData *data = source_data;
- if (data->callback(user_data))
+ if (data->callback (user_data))
{
guint seconds = data->interval / 1000;
guint msecs = data->interval - seconds * 1000;