[vala] glib-2.0: add HashTable.take and length



commit b715fca08b42a02337ee1f4e5eae4f9f0789eb30
Author: Evan Nemerson <evan nemerson com>
Date:   Tue Jun 10 22:01:56 2014 -0700

    glib-2.0: add HashTable.take and length

 vapi/glib-2.0.vapi |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/vapi/glib-2.0.vapi b/vapi/glib-2.0.vapi
index 29801e0..0e8ec87 100644
--- a/vapi/glib-2.0.vapi
+++ b/vapi/glib-2.0.vapi
@@ -4164,6 +4164,18 @@ namespace GLib {
                public uint size ();
                public bool steal (K key);
                public void steal_all ();
+               [CCode (cname = "_vala_g_hash_table_take")]
+               public V? take (K key, out bool exists = null) {
+                       GLib.HashTable<K,V>? ht = null;
+                       void** htp = &ht;
+                       *htp = this.lookup (key);
+                       exists = this.steal (key);
+                       return ht;
+               }
+               public uint length {
+                       [CCode (cname = "g_hash_table_get_size")]
+                       get;
+               }
        }
 
        public struct HashTableIter<K,V> {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]