/* Calls all of the #GHook functions in a #GHookList.  */
void g_hook_list_invoke(GHookList *hook_list, gboolean may_recurse)
/* Calls all of the #GHook functions in a #GHookList.  */
void g_hook_list_invoke(GHookList *hook_list, gboolean may_recurse)
{
  GHook *hook;
  g_return_if_fail (hook_list != NULL);
  g_return_if_fail (hook_list->is_setup);
  hook = g_hook_first_valid (hook_list, may_recurse);
  while (hook)
    {
      GHookFunc func;
      gboolean was_in_call;
      func = (GHookFunc) hook->func;
      was_in_call = G_HOOK_IN_CALL (hook);
      hook->flags |= G_HOOK_FLAG_IN_CALL;
      func (hook->data);
      if (!was_in_call)
	hook->flags &= ~G_HOOK_FLAG_IN_CALL;
      hook = g_hook_next_valid (hook_list, hook, may_recurse);
    }
}