From: Evan Nemerson Date: Tue, 9 Oct 2012 19:26:10 +0000 (-0700) Subject: glib-2.0: generic-related improvements to Tree X-Git-Tag: 0.19.0~116 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=be7d404aa636b57d8412d01740fa52d6864f3cbd;p=thirdparty%2Fvala.git glib-2.0: generic-related improvements to Tree --- diff --git a/vapi/glib-2.0.vapi b/vapi/glib-2.0.vapi index 647924955..103461537 100644 --- a/vapi/glib-2.0.vapi +++ b/vapi/glib-2.0.vapi @@ -4281,7 +4281,7 @@ namespace GLib { /* GTree */ - public delegate bool TraverseFunc (void* key, void* value); + public delegate bool TraverseFunc (K key, V value); [CCode (cprefix = "G_", has_type_id = false)] public enum TraverseType { @@ -4300,7 +4300,9 @@ namespace GLib { [CCode (free_function = "g_tree_destroy")] #endif public class Tree { - public Tree (CompareFunc key_compare_func); + [CCode (cname = "g_tree_new_full", simple_generics = true)] + public Tree (CompareDataFunc key_compare_func); + [Deprecated (since = "vala-0.20", replacement = "Tree ()")] public Tree.with_data (CompareDataFunc key_compare_func); public Tree.full (CompareDataFunc key_compare_func, DestroyNotify? key_destroy_func, DestroyNotify? value_destroy_func); public void insert (owned K key, owned V value); @@ -4308,8 +4310,8 @@ namespace GLib { public int nnodes (); public int height (); public unowned V lookup (K key); - public bool lookup_extended (K lookup_key, K orig_key, V value); - public void foreach (TraverseFunc traverse_func); + public bool lookup_extended (K lookup_key, out unowned K orig_key, out unowned V value); + public void foreach (TraverseFunc traverse_func); public unowned V search (TreeSearchFunc search_func); [CCode (cname = "g_tree_search")] public unowned V search_key (CompareFunc search_func, K key);