From c712f972cbcc2e20235d160a1a10b1e0b8076505 Mon Sep 17 00:00:00 2001 From: Mike Hearn Date: Sun, 4 Jul 2004 21:52:26 +0000 Subject: [PATCH] Use a direct hash rather than an int hash --- ChangeLog | 3 +++ libnotify/notify.c | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index ce21d15..5713fc7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +Sun Jul 4 22:54:44 GMT 2004 Mike Hearn + * libnotify/notify.c: Use a direct hash rather than an int hash + Sun Jul 04 14:32:46 PDT 2004 Christian Hammond * libnotify/notify.c: diff --git a/libnotify/notify.c b/libnotify/notify.c index 7760800..41e77d8 100644 --- a/libnotify/notify.c +++ b/libnotify/notify.c @@ -101,7 +101,7 @@ _notify_handle_new(guint32 id) handle->id = id; - g_hash_table_insert(_handles, GINT_TO_POINTER(id), handle); + g_hash_table_insert(_handles, id, handle); return handle; } @@ -353,7 +353,7 @@ notify_init(const char *app_name) _app_name = g_strdup(app_name); - _handles = g_hash_table_new_full(g_int_hash, g_int_equal, + _handles = g_hash_table_new_full(g_direct_hash, g_int_equal, NULL, (GFreeFunc)_notify_handle_destroy); #ifdef HAVE_ATEXIT