#include <glib.h>
+#include "utils.h"
#include "hooks.h"
-GHashTable *hooklist_table;
+static GHashTable *hooklist_table;
GHookList *hooks_get_hooklist(gchar *hooklist_name)
{
g_hook_append(hooklist, hook);
+ debug_print("registed new hook for '%s' as id %d\n", hooklist_name, hook->hook_id);
+
return hook->hook_id;
}
hook = g_hook_get(hooklist, hook_id);
g_return_if_fail(hook != NULL);
- g_hook_destroy_link(hooklist, hook);
+ debug_print("unregisted hook %d in '%s'\n", hook->hook_id, hooklist_name);
+
+ g_hook_destroy(hooklist, hook);
}
struct MarshalData