Add boolean returns to some hash functions

The functions g_hash_table_insert, g_hash_table_replace
and g_hash_table_add now return TRUE if they inserted a
new key/value pair.

https://bugzilla.gnome.org/show_bug.cgi?id=697828
This commit is contained in:
Matthias Clasen
2013-11-24 01:22:44 -05:00
parent 616af3b80e
commit 910191597a
3 changed files with 34 additions and 16 deletions

View File

@@ -66,15 +66,15 @@ GHashTable* g_hash_table_new_full (GHashFunc hash_func,
GLIB_AVAILABLE_IN_ALL
void g_hash_table_destroy (GHashTable *hash_table);
GLIB_AVAILABLE_IN_ALL
void g_hash_table_insert (GHashTable *hash_table,
gboolean g_hash_table_insert (GHashTable *hash_table,
gpointer key,
gpointer value);
GLIB_AVAILABLE_IN_ALL
void g_hash_table_replace (GHashTable *hash_table,
gboolean g_hash_table_replace (GHashTable *hash_table,
gpointer key,
gpointer value);
GLIB_AVAILABLE_IN_ALL
void g_hash_table_add (GHashTable *hash_table,
gboolean g_hash_table_add (GHashTable *hash_table,
gpointer key);
GLIB_AVAILABLE_IN_ALL
gboolean g_hash_table_remove (GHashTable *hash_table,