diff --git a/glib/glib.h b/glib/glib.h index 4a8423d0ad..7d395d5e58 100644 --- a/glib/glib.h +++ b/glib/glib.h @@ -782,11 +782,12 @@ GArray* g_rarray_truncate (GArray *array, gint g_str_equal (const gpointer v, const gpointer v2); guint g_str_hash (const gpointer v); -/* These two "hash" functions actually just return the value and/or - comparison of the pointers themselves - useful for hashing - on an int value or something like that */ -gint g_direct_compare(gpointer a, gpointer b); -guint g_direct_hash(gpointer key); + +/* This "hash" function will just return the key's adress as an + * unsigned integer. Useful for hashing on plain adresses or + * simple integer values. + */ +guint g_direct_hash (gpointer key); /* GScanner: Flexible lexical scanner for general purpose. diff --git a/glib/gutils.c b/glib/gutils.c index f9b5f94ca5..7c42bf856a 100644 --- a/glib/gutils.c +++ b/glib/gutils.c @@ -912,6 +912,6 @@ g_parse_debug_string (const gchar *string, guint g_direct_hash(gpointer key) { - return (guint)key; + return (guint) key; }