From: Evan Nemerson Date: Wed, 11 Jun 2014 05:01:56 +0000 (-0700) Subject: glib-2.0: add HashTable.take and length X-Git-Tag: 0.25.1~46 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b715fca08b42a02337ee1f4e5eae4f9f0789eb30;p=thirdparty%2Fvala.git glib-2.0: add HashTable.take and length --- diff --git a/vapi/glib-2.0.vapi b/vapi/glib-2.0.vapi index 29801e0f4..0e8ec877a 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? 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 {