mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-01 15:03:39 +02:00
Add notes about how you shouldn't modify these data structures as you
2001-11-29 Havoc Pennington <hp@redhat.com> * glib/gtree.c (g_tree_foreach): * glib/ghash.c (g_hash_table_foreach): Add notes about how you shouldn't modify these data structures as you iterate over them.
This commit is contained in:
committed by
Havoc Pennington
parent
4790c35c8d
commit
eb2f6f6fc1
@@ -442,7 +442,11 @@ g_tree_lookup_extended (GTree *tree,
|
||||
*
|
||||
* Calls the given function for each of the key/value pairs in the #GTree.
|
||||
* The function is passed the key and value of each pair, and the given
|
||||
* @data parameter.
|
||||
* @data parameter. The tree may not be modified while iterating over
|
||||
* it (you can't add/remove items). To remove all items matching
|
||||
* a predicate, you need to add each item to a list as in your
|
||||
* #GTraverseFunc as you walk over the tree, then walk the list
|
||||
* and remove each item.
|
||||
**/
|
||||
void
|
||||
g_tree_foreach (GTree *tree,
|
||||
|
Reference in New Issue
Block a user