glib_compat: lift g_list_sort() & g_slist_sort() from glib code

This commit is contained in:
Nguyen Anh Quynh
2016-12-26 18:32:02 +08:00
parent b05087d314
commit fba6046fd0
2 changed files with 170 additions and 84 deletions

View File

@ -44,11 +44,13 @@ typedef unsigned int guint;
typedef char gchar;
typedef int gboolean;
typedef gint (*GCompareDataFunc)(gconstpointer a,
gconstpointer b,
gpointer user_data);
typedef void (*GFunc)(gpointer data, gpointer user_data);
typedef gint (*GCompareFunc)(gconstpointer v1, gconstpointer v2);
typedef void (*GDestroyNotify)(gpointer data);
guint g_direct_hash(gconstpointer v);
guint g_str_hash(gconstpointer v);
gboolean g_str_equal(gconstpointer v1, gconstpointer v2);
guint g_int_hash(gconstpointer v);