diff options
author | Tim Janik <timj@gtk.org> | 1999-01-17 04:49:43 +0000 |
---|---|---|
committer | Tim Janik <timj@src.gnome.org> | 1999-01-17 04:49:43 +0000 |
commit | 08425ac4c2fce32d96295e3fefe31f1ddcc17db0 (patch) | |
tree | 820e0020c9112d0fb35e368d48a8a9b48eeae1de /ghook.c | |
parent | f477518c3af60dccfdd172abee0c7368e8f44189 (diff) | |
download | glib-08425ac4c2fce32d96295e3fefe31f1ddcc17db0.tar.gz |
incremented version number to 1.1.13, bin age 0, interface age 0.
Sun Jan 17 05:12:17 1999 Tim Janik <timj@gtk.org>
* configure.in: incremented version number to 1.1.13, bin age 0,
interface age 0.
* glib.h: added hook_destroy member to struct _GHookList.
* ghook.c (g_hook_destroy_link): if the hook_list defines a hook_destroy
function, use that to marshal hook destruction notifiers.
* gmain.c: removed g_source_free_func and added g_source_destroy_func,
which marshalls the user_data and source_data destructors of sources
outside of the main_loop lock.
removed GIdleData struct since its single member callback can be passed
as source_data directly.
added a gboolean return value to all g_source_remove* functions,
indicating whether the source could be removed, because these functions
don't issue warnings upon unseccessful removals themselves. this way at
least the caller gets a chance to warn upon failing removals.
(g_main_iterate): set in_check_or_prepare around calls to check() or
prepare().
(g_main_pending): simply return FALSE if called from within check() or
prepare().
(g_main_iteration): issue a warning if called from within check() or
prepare() and bail out with FALSE.
(g_main_run): likewise.
(g_source_remove_by_funcs_user_data): new function to remove sources by
user data and function table.
(g_idle_remove_by_data): new function to really remove idles only, since
g_source_remove_by_user_data would remove timeouts or other sources as
well.
Diffstat (limited to 'ghook.c')
-rw-r--r-- | ghook.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -48,6 +48,7 @@ g_hook_list_init (GHookList *hook_list, hook_size * G_HOOKS_PREALLOC, G_ALLOC_AND_FREE); hook_list->hook_free = NULL; + hook_list->hook_destroy = NULL; } void @@ -129,7 +130,12 @@ g_hook_destroy_link (GHookList *hook_list, { hook->hook_id = 0; hook->flags &= ~G_HOOK_FLAG_ACTIVE; - if (hook->destroy) + if (hook_list->hook_destroy) + { + hook_list->hook_destroy (hook_list, hook); + hook->destroy = NULL; + } + else if (hook->destroy) { GDestroyNotify destroy; |