diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/libutil/util.c | 12 | ||||
-rw-r--r-- | src/libutil/util.h | 2 |
2 files changed, 14 insertions, 0 deletions
diff --git a/src/libutil/util.c b/src/libutil/util.c index fee039c85..10b388977 100644 --- a/src/libutil/util.c +++ b/src/libutil/util.c @@ -1327,6 +1327,18 @@ g_ptr_array_unref (GPtrArray *array) { g_ptr_array_free (array, TRUE); } +gboolean +g_int64_equal (gconstpointer v1, gconstpointer v2) +{ + return *((const gint64*) v1) == *((const gint64*) v2); +} +guint +g_int64_hash (gconstpointer v) +{ + guint64 v64 = *(guint64 *)v; + + return (guint) (v ^ (v >> 32)); +} #endif #if ((GLIB_MAJOR_VERSION == 2) && (GLIB_MINOR_VERSION < 14)) void diff --git a/src/libutil/util.h b/src/libutil/util.h index c2e0f1605..ab1d205c1 100644 --- a/src/libutil/util.h +++ b/src/libutil/util.h @@ -177,6 +177,8 @@ void gperf_profiler_stop (void); */ #if ((GLIB_MAJOR_VERSION == 2) && (GLIB_MINOR_VERSION < 22)) void g_ptr_array_unref (GPtrArray *array); +gboolean g_int64_equal (gconstpointer v1, gconstpointer v2); +guint g_int64_hash (gconstpointer v); #endif #if ((GLIB_MAJOR_VERSION == 2) && (GLIB_MINOR_VERSION < 14)) void g_queue_clear (GQueue *queue); |