diff options
author | Ryan Lortie <desrt@desrt.ca> | 2012-01-06 10:09:32 -0500 |
---|---|---|
committer | Ryan Lortie <desrt@desrt.ca> | 2012-01-06 10:18:41 -0500 |
commit | 752f0cac159dc84c03c42f84d9d8a8c923334d43 (patch) | |
tree | 8ca78bf3987db283803070d52c8eb676a9832df6 /glib/ghash.h | |
parent | b87f6f9f8cb789a645b8792cf197328fb686ba55 (diff) | |
download | glib-752f0cac159dc84c03c42f84d9d8a8c923334d43.tar.gz |
GHashTable: new 'add' and 'contains' APIs
These are both convenience APIs that make it slightly nicer to use
GHashTable as a set (which is something we document as officially
supported).
Diffstat (limited to 'glib/ghash.h')
-rw-r--r-- | glib/ghash.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/glib/ghash.h b/glib/ghash.h index fdff5fd6e..a998a3832 100644 --- a/glib/ghash.h +++ b/glib/ghash.h @@ -68,6 +68,8 @@ void g_hash_table_insert (GHashTable *hash_table, void g_hash_table_replace (GHashTable *hash_table, gpointer key, gpointer value); +void g_hash_table_add (GHashTable *hash_table, + gpointer key); gboolean g_hash_table_remove (GHashTable *hash_table, gconstpointer key); void g_hash_table_remove_all (GHashTable *hash_table); @@ -76,6 +78,8 @@ gboolean g_hash_table_steal (GHashTable *hash_table, void g_hash_table_steal_all (GHashTable *hash_table); gpointer g_hash_table_lookup (GHashTable *hash_table, gconstpointer key); +gboolean g_hash_table_has (GHashTable *hash_table, + gconstpointer lookup_key); gboolean g_hash_table_lookup_extended (GHashTable *hash_table, gconstpointer lookup_key, gpointer *orig_key, |