added a define G_HOOK_DEFERRED_DESTROY, to substitute a noop
authorTim Janik <timj@gtk.org>
Sun, 17 Jan 1999 14:52:20 +0000 (14:52 +0000)
committerTim Janik <timj@src.gnome.org>
Sun, 17 Jan 1999 14:52:20 +0000 (14:52 +0000)
commit5c2fb3762f9174d78213b2b2d8934883919b4f67
tree75e90b89315b0eabead2fda2c151e3a298a9ff2e
parent04d3d1b219347582f55b712b1fbe98fa26d22d84
added a define G_HOOK_DEFERRED_DESTROY, to substitute a noop

Sun Jan 17 14:13:52 1999  Tim Janik  <timj@gtk.org>

        * glib.h: added a define G_HOOK_DEFERRED_DESTROY, to substitute a noop
        GHookList.hook_destroy function.

        * ghook.c (g_hook_destroy_link): don't really call hook_destroy if it
        is G_HOOK_DEFERRED_DESTROY. for the case where we invoke hook->destroy()
        we now clean up the hook completely afterwards, i.e. data, func and
        destroy are immediately set to NULL and hook_free can't play with that
        values anymore.

        * gmain.c (g_source_add): set hook_destroy to G_HOOK_DEFERRED_DESTROY,
        instead of using an ugly _noop() hack, this is to avoid an uneccessary
        function invokation. set hook_free to g_source_destroy_func, this way
        we always invoke the destroy notifiers for user_data and source_data
        after execution of dispatch(). thus, g_source_destroy_func() will always
        be called within the main_loop lock (this wasn't really assured
        before), and can release and reaquire the look around destroy notifier
        invokation.
14 files changed:
ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-12
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
ghook.c
glib.h
glib/ghook.c
glib/glib.h
glib/gmain.c
gmain.c