From 933d318ab2277aa38bab8c9b6c68accb504dc588 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Wed, 11 Nov 2009 15:54:12 -0500 Subject: [PATCH] document g_tree_delete_versions() --- glib/gtree.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/glib/gtree.c b/glib/gtree.c index 0e04b022..5b8ba818 100644 --- a/glib/gtree.c +++ b/glib/gtree.c @@ -674,6 +674,23 @@ g_tree_node_delete_versions (GTree *tree, return ret; } +/** + * g_tree_delete_versions: + * @tree: a #GTree. + * @version: the highest version to delete. + * + * Deletes all versions in the #GTree which are at most @version. You can not + * delete the latest version of the #GTree, so @version must be less than the + * value returned by g_tree_current_version(). + + * Deleting a version from the #GTree frees all resources used that are not + * needed for later versions in the #GTree. All elements which have been + * removed from the tree in a version no later than @version will be freed, + * and if you supplied a @key_destroy_func or @value_destroy_func when + * creating the #GTree, any such nodes will have their keys and values + * freed using these functions (unless it was removed from the #GTree by + * g_tree_steal(), in which case the key and value is not freed). + **/ void g_tree_delete_versions (GTree *tree, guint version) -- 2.34.1