projects
/
platform
/
upstream
/
glib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
incremented version number to 1.1.13, bin age 0, interface age 0.
[platform/upstream/glib.git]
/
glib
/
ghook.c
diff --git
a/glib/ghook.c
b/glib/ghook.c
index
b9d7adb
..
89c7cfb
100644
(file)
--- a/
glib/ghook.c
+++ b/
glib/ghook.c
@@
-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_size * G_HOOKS_PREALLOC,
G_ALLOC_AND_FREE);
hook_list->hook_free = NULL;
+ hook_list->hook_destroy = NULL;
}
void
}
void
@@
-129,7
+130,12
@@
g_hook_destroy_link (GHookList *hook_list,
{
hook->hook_id = 0;
hook->flags &= ~G_HOOK_FLAG_ACTIVE;
{
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;
{
GDestroyNotify destroy;
@@
-273,11
+279,9
@@
g_hook_list_invoke (GHookList *hook_list,
hook = g_hook_first_valid (hook_list, may_recurse);
while (hook)
{
hook = g_hook_first_valid (hook_list, may_recurse);
while (hook)
{
- GHook *tmp;
GHookFunc func;
gboolean was_in_call;
GHookFunc func;
gboolean was_in_call;
- g_hook_ref (hook_list, hook);
func = (GHookFunc) hook->func;
was_in_call = G_HOOK_IN_CALL (hook);
func = (GHookFunc) hook->func;
was_in_call = G_HOOK_IN_CALL (hook);
@@
-286,10
+290,7
@@
g_hook_list_invoke (GHookList *hook_list,
if (!was_in_call)
hook->flags &= ~G_HOOK_FLAG_IN_CALL;
if (!was_in_call)
hook->flags &= ~G_HOOK_FLAG_IN_CALL;
- tmp = g_hook_next_valid (hook_list, hook, may_recurse);
-
- g_hook_unref (hook_list, hook);
- hook = tmp;
+ hook = g_hook_next_valid (hook_list, hook, may_recurse);
}
}
}
}
@@
-305,12
+306,10
@@
g_hook_list_invoke_check (GHookList *hook_list,
hook = g_hook_first_valid (hook_list, may_recurse);
while (hook)
{
hook = g_hook_first_valid (hook_list, may_recurse);
while (hook)
{
- GHook *tmp;
GHookCheckFunc func;
gboolean was_in_call;
gboolean need_destroy;
GHookCheckFunc func;
gboolean was_in_call;
gboolean need_destroy;
- g_hook_ref (hook_list, hook);
func = (GHookCheckFunc) hook->func;
was_in_call = G_HOOK_IN_CALL (hook);
func = (GHookCheckFunc) hook->func;
was_in_call = G_HOOK_IN_CALL (hook);
@@
-321,10
+320,7
@@
g_hook_list_invoke_check (GHookList *hook_list,
if (need_destroy)
g_hook_destroy_link (hook_list, hook);
if (need_destroy)
g_hook_destroy_link (hook_list, hook);
- tmp = g_hook_next_valid (hook_list, hook, may_recurse);
-
- g_hook_unref (hook_list, hook);
- hook = tmp;
+ hook = g_hook_next_valid (hook_list, hook, may_recurse);
}
}
}
}
@@
-343,12
+339,9
@@
g_hook_list_marshal_check (GHookList *hook_list,
hook = g_hook_first_valid (hook_list, may_recurse);
while (hook)
{
hook = g_hook_first_valid (hook_list, may_recurse);
while (hook)
{
- GHook *tmp;
gboolean was_in_call;
gboolean need_destroy;
gboolean was_in_call;
gboolean need_destroy;
- g_hook_ref (hook_list, hook);
-
was_in_call = G_HOOK_IN_CALL (hook);
hook->flags |= G_HOOK_FLAG_IN_CALL;
need_destroy = !marshaller (hook, data);
was_in_call = G_HOOK_IN_CALL (hook);
hook->flags |= G_HOOK_FLAG_IN_CALL;
need_destroy = !marshaller (hook, data);
@@
-357,10
+350,7
@@
g_hook_list_marshal_check (GHookList *hook_list,
if (need_destroy)
g_hook_destroy_link (hook_list, hook);
if (need_destroy)
g_hook_destroy_link (hook_list, hook);
- tmp = g_hook_next_valid (hook_list, hook, may_recurse);
-
- g_hook_unref (hook_list, hook);
- hook = tmp;
+ hook = g_hook_next_valid (hook_list, hook, may_recurse);
}
}
}
}
@@
-379,21
+369,15
@@
g_hook_list_marshal (GHookList *hook_list,
hook = g_hook_first_valid (hook_list, may_recurse);
while (hook)
{
hook = g_hook_first_valid (hook_list, may_recurse);
while (hook)
{
- GHook *tmp;
gboolean was_in_call;
gboolean was_in_call;
- g_hook_ref (hook_list, hook);
-
was_in_call = G_HOOK_IN_CALL (hook);
hook->flags |= G_HOOK_FLAG_IN_CALL;
marshaller (hook, data);
if (!was_in_call)
hook->flags &= ~G_HOOK_FLAG_IN_CALL;
was_in_call = G_HOOK_IN_CALL (hook);
hook->flags |= G_HOOK_FLAG_IN_CALL;
marshaller (hook, data);
if (!was_in_call)
hook->flags &= ~G_HOOK_FLAG_IN_CALL;
- tmp = g_hook_next_valid (hook_list, hook, may_recurse);
-
- g_hook_unref (hook_list, hook);
- hook = tmp;
+ hook = g_hook_next_valid (hook_list, hook, may_recurse);
}
}
}
}