/* The @handler_id has to be a valid signal handler id, connected to a signal of @instance.  */
void g_signal_handler_disconnect(gpointer instance, gulong handler_id)
/* The @handler_id has to be a valid signal handler id, connected to a signal of @instance.  */
void g_signal_handler_disconnect(gpointer instance, gulong handler_id)
{
  Handler *handler;
  g_return_if_fail (G_TYPE_CHECK_INSTANCE (instance));
  g_return_if_fail (handler_id > 0);
  SIGNAL_LOCK ();
  handler = handler_lookup (instance, handler_id, 0, 0);
  if (handler)
    {
      g_hash_table_remove (g_handlers, handler);
      handler->sequential_number = 0;
      handler->block_count = 1;
      remove_invalid_closure_notify (handler, instance);
      handler_unref_R (handler->signal_id, instance, handler);
    }
  else
    g_warning ("%s: instance '%p' has no handler with id '%lu'", G_STRLOC, instance, handler_id);
  SIGNAL_UNLOCK ();
}