From 4a3f9aa43df81215cbb0ad1ae1c00702798f44f9 Mon Sep 17 00:00:00 2001 From: Cosimo Cecchi Date: Wed, 27 May 2009 14:36:31 +0200 Subject: Add a helper uint_compare function --- libempathy/empathy-utils.c | 7 +++++++ libempathy/empathy-utils.h | 2 ++ 2 files changed, 9 insertions(+) diff --git a/libempathy/empathy-utils.c b/libempathy/empathy-utils.c index b5c3a0e7e..9bcd65683 100644 --- a/libempathy/empathy-utils.c +++ b/libempathy/empathy-utils.c @@ -380,3 +380,10 @@ empathy_check_available_state (void) return TRUE; } +gint +empathy_uint_compare (gconstpointer a, + gconstpointer b) +{ + return *(guint*) a - *(guint*) b; +} + diff --git a/libempathy/empathy-utils.h b/libempathy/empathy-utils.h index d36503c7f..de1437b9d 100644 --- a/libempathy/empathy-utils.h +++ b/libempathy/empathy-utils.h @@ -78,6 +78,8 @@ gboolean empathy_proxy_equal (gconstpointer a, gconstpointer b); guint empathy_proxy_hash (gconstpointer key); gboolean empathy_check_available_state (void); +gint empathy_uint_compare (gconstpointer a, + gconstpointer b); G_END_DECLS -- cgit v1.2.3