document g_tree_delete_versions()
authorDana Jansens <danakj@orodu.net>
Wed, 11 Nov 2009 20:54:12 +0000 (15:54 -0500)
committerDana Jansens <danakj@orodu.net>
Thu, 12 Nov 2009 22:21:09 +0000 (17:21 -0500)
glib/gtree.c

index 0e04b022b7483baaa091709b24329165e2f4f6e0..5b8ba818eb305ac5c80546f7b900e1a3a1060a71 100644 (file)
@@ -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)