glib_compat: lift hash functions from glib

This commit is contained in:
Nguyen Anh Quynh 2016-12-26 20:12:01 +08:00
parent fba6046fd0
commit e4382c0467
2 changed files with 814 additions and 192 deletions

File diff suppressed because it is too large Load Diff

View File

@ -40,9 +40,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
typedef void* gpointer;
typedef const void *gconstpointer;
typedef int gint;
typedef uint32_t guint32;
typedef unsigned int guint;
typedef char gchar;
typedef int gboolean;
typedef unsigned long gulong;
typedef gint (*GCompareDataFunc)(gconstpointer a,
gconstpointer b,
@ -93,7 +95,7 @@ typedef struct _GHashTable GHashTable;
void g_hash_table_destroy(GHashTable *hash_table);
gpointer g_hash_table_find(GHashTable *hash_table, GHRFunc predicate, gpointer user_data);
void g_hash_table_foreach(GHashTable *hash_table, GHFunc func, gpointer user_data);
gboolean g_hash_table_insert(GHashTable *hash_table, gpointer key, gpointer value);
void g_hash_table_insert(GHashTable *hash_table, gpointer key, gpointer value);
gpointer g_hash_table_lookup(GHashTable *hash_table, gconstpointer key);
GHashTable *g_hash_table_new(GHashFunc hash_func, GEqualFunc key_equal_func);
GHashTable *g_hash_table_new_full(GHashFunc hash_func, GEqualFunc key_equal_func,