aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCosimo Cecchi <cosimoc@gnome.org>2009-05-27 20:36:31 +0800
committerCosimo Cecchi <cosimoc@gnome.org>2009-06-01 23:55:33 +0800
commit4a3f9aa43df81215cbb0ad1ae1c00702798f44f9 (patch)
treed71ff964e026cf8ca1227bf6f09122f7e6e7f320
parentb430108ed73aad05a6cb6f94bdb7092abe4daebc (diff)
downloadgsoc2013-empathy-4a3f9aa43df81215cbb0ad1ae1c00702798f44f9.tar
gsoc2013-empathy-4a3f9aa43df81215cbb0ad1ae1c00702798f44f9.tar.gz
gsoc2013-empathy-4a3f9aa43df81215cbb0ad1ae1c00702798f44f9.tar.bz2
gsoc2013-empathy-4a3f9aa43df81215cbb0ad1ae1c00702798f44f9.tar.lz
gsoc2013-empathy-4a3f9aa43df81215cbb0ad1ae1c00702798f44f9.tar.xz
gsoc2013-empathy-4a3f9aa43df81215cbb0ad1ae1c00702798f44f9.tar.zst
gsoc2013-empathy-4a3f9aa43df81215cbb0ad1ae1c00702798f44f9.zip
Add a helper uint_compare function
-rw-r--r--libempathy/empathy-utils.c7
-rw-r--r--libempathy/empathy-utils.h2
2 files changed, 9 insertions, 0 deletions
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