]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
glib-2.0: Add HashTable.find method and HRFunc delegate.
authorLuca Bruno <lucabru@src.gnome.org>
Fri, 17 Dec 2010 20:42:35 +0000 (21:42 +0100)
committerLuca Bruno <lucabru@src.gnome.org>
Fri, 17 Dec 2010 20:43:51 +0000 (21:43 +0100)
Based on Alexander Krivács Schrøder patch.

Fixes bug 636786.

vapi/glib-2.0.vapi

index d6ace50a98f698754bf878388832f68c370007bf..f2c4a710433e6723c6f030ebe1a72323c2320870 100644 (file)
@@ -3690,6 +3690,7 @@ namespace GLib {
                public void @foreach (HFunc<K,V> func);
                [CCode (cname = "g_hash_table_foreach")]
                public void for_each (HFunc<K,V> func);
+               public unowned V find (HRFunc<K,V> predicate);
                public uint size ();
                public bool steal (K key);
                public void steal_all ();
@@ -3708,6 +3709,7 @@ namespace GLib {
        [CCode (has_target = false)]
        public delegate bool EqualFunc<G> (G a, G b);
        public delegate void HFunc<K,V> (K key, V value);
+       public delegate bool HRFunc<K,V> (K key, V value);
 
        [CCode (has_target = false)]
        public delegate void DestroyNotify (void* data);