/* Returns: the #GHook with the given id, or NULL if it is not found  */
GHook* g_hook_get(GHookList *hook_list, gulong hook_id)
/* Returns: the #GHook with the given id, or NULL if it is not found  */
GHook* g_hook_get(GHookList *hook_list, gulong hook_id)
{
  GHook *hook;
  g_return_val_if_fail (hook_list != NULL, NULL);
  g_return_val_if_fail (hook_id > 0, NULL);
  hook = hook_list->hooks;
  while (hook)
    {
      if (hook->hook_id == hook_id)
	return hook;
      hook = hook->next;
    }
  return NULL;
}