After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 724383 - glib: document restrictions on various foreach() functions
glib: document restrictions on various foreach() functions
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2014-02-14 21:06 UTC by Dan Winship
Modified: 2017-11-16 11:15 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
glib: document restrictions on various foreach() functions (6.26 KB, patch)
2014-02-14 21:06 UTC, Dan Winship
none Details | Review
glib: document restrictions on various foreach() functions (6.25 KB, patch)
2014-04-09 15:20 UTC, Dan Winship
committed Details | Review

Description Dan Winship 2014-02-14 21:06:27 UTC
this came up in an NM code review so I figured it should be more explicit...
Comment 1 Dan Winship 2014-02-14 21:06:29 UTC
Created attachment 269147 [details] [review]
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.
Comment 2 Dan Winship 2014-04-09 15:20:11 UTC
Created attachment 273905 [details] [review]
glib: document restrictions on various foreach() functions

----

oops, fix the parts that weren't true. (It's actually not safe for the
g_list_free_full() / g_slist_free_full() callback to remove items from
the list).
Comment 3 Philip Withnall 2017-11-16 11:12:16 UTC
Review of attachment 273905 [details] [review]:

++
Comment 4 Philip Withnall 2017-11-16 11:14:56 UTC
Attachment 273905 [details] pushed as 42d3ed0 - glib: document restrictions on various foreach() functions