glib: document restrictions on various foreach() functions

Some foreach() functions allow you to modify the object they are
iterating, and others don't, but the docs were not generally clear
about this.

https://bugzilla.gnome.org/show_bug.cgi?id=724383
This commit is contained in:
Dan Winship
2014-02-14 16:03:49 -05:00
committed by Philip Withnall
parent 3cfac71d09
commit 42d3ed0013
7 changed files with 37 additions and 7 deletions

View File

@@ -816,6 +816,7 @@ g_node_depth_traverse_level (GNode *node,
* Traverses a tree starting at the given root #GNode.
* It calls the given function for each node visited.
* The traversal can be halted at any point by returning %TRUE from @func.
* @func must not do anything that would modify the structure of the tree.
*/
/**
@@ -1235,8 +1236,9 @@ g_node_last_sibling (GNode *node)
* @func: the function to call for each visited node
* @data: user data to pass to the function
*
* Calls a function for each of the children of a #GNode.
* Note that it doesn't descend beneath the child nodes.
* Calls a function for each of the children of a #GNode. Note that it
* doesn't descend beneath the child nodes. @func must not do anything
* that would modify the structure of the tree.
*/
/**
* GNodeForeachFunc: