summaryrefslogtreecommitdiff
path: root/gutils.c
diff options
context:
space:
mode:
Diffstat (limited to 'gutils.c')
-rw-r--r--gutils.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/gutils.c b/gutils.c
index 8528163f4..c33efc4bd 100644
--- a/gutils.c
+++ b/gutils.c
@@ -851,8 +851,25 @@ g_parse_debug_string (const gchar *string,
}
guint
-g_direct_hash(gconstpointer key)
+g_direct_hash(gconstpointer v)
{
- return GPOINTER_TO_UINT (key);
+ return GPOINTER_TO_UINT (v);
}
+gint
+g_direct_equal(gconstpointer v, gconstpointer v2)
+{
+ return GPOINTER_TO_UINT (v) == GPOINTER_TO_UINT (v2);
+}
+
+gint
+g_int_equal (gconstpointer v, gconstpointer v2)
+{
+ return *((const gint*) v) == *((const gint*) v2);
+}
+
+guint
+g_int_hash (gconstpointer v)
+{
+ return *(const gint*) v;
+}