diff options
author | Tim Janik <timj@src.gnome.org> | 1999-01-17 05:03:18 +0000 |
---|---|---|
committer | Tim Janik <timj@src.gnome.org> | 1999-01-17 05:03:18 +0000 |
commit | 37f659ec1127781395c3523244399514ba99eab7 (patch) | |
tree | 31b597e7e58c8d3875683ee7a4b45d2c1b3eef65 /gmain.c | |
parent | 08425ac4c2fce32d96295e3fefe31f1ddcc17db0 (diff) |
reentrancy fixups
Diffstat (limited to 'gmain.c')
-rw-r--r-- | gmain.c | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -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; |