]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
glib-2.0.vapi: add new GHashTable API
authorRyan Lortie <desrt@desrt.ca>
Fri, 6 Jan 2012 15:30:28 +0000 (10:30 -0500)
committerRyan Lortie <desrt@desrt.ca>
Fri, 6 Jan 2012 15:30:28 +0000 (10:30 -0500)
g_hash_table_add() and g_hash_table_contains() were just added to GLib
so add them here.

It's now possible to say 'if (key in table) { }'.

vapi/glib-2.0.vapi

index def6bcc511064569a3a83a2cf2a1fe67d6771300..5532d337f1b490aa7c786fcf5843ab742821d023 100644 (file)
@@ -3914,8 +3914,10 @@ namespace GLib {
                public HashTable.full (HashFunc<K>? hash_func, EqualFunc<K>? key_equal_func, DestroyNotify? key_destroy_func, DestroyNotify? value_destroy_func);
                public void insert (owned K key, owned V value);
                public void replace (owned K key, owned V value);
+               public void add (owned K key);
                public unowned V? lookup (K key);
                public bool lookup_extended (K lookup_key, out unowned K orig_key, out unowned V value);
+               public bool contains (K key);
                public bool remove (K key);
                public void remove_all ();
                [CCode (cname = "g_hash_table_lookup")]