/* Removes one #GHook from a #GHookList, marking it inactive and calling g_hook_unref() on it.  */
void g_hook_destroy_link(GHookList *hook_list, GHook *hook)
/* Removes one #GHook from a #GHookList, marking it inactive and calling g_hook_unref() on it.  */
void g_hook_destroy_link(GHookList *hook_list, GHook *hook)
{
  g_return_if_fail (hook_list != NULL);
  g_return_if_fail (hook != NULL);
  hook->flags &= ~G_HOOK_FLAG_ACTIVE;
  if (hook->hook_id)
    {
      hook->hook_id = 0;
      g_hook_unref (hook_list, hook);
    }
}