projects
/
platform
/
upstream
/
glib.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
59a8ae3
)
GHashTable: Explicitly document that _iter_remove() is safe while iterating
author
Xavier Claessens
<xavier.claessens@collabora.com>
Fri, 21 Feb 2014 20:35:36 +0000
(15:35 -0500)
committer
Xavier Claessens
<xavier.claessens@collabora.com>
Fri, 21 Feb 2014 20:39:31 +0000
(15:39 -0500)
https://bugzilla.gnome.org/show_bug.cgi?id=723316
glib/ghash.c
patch
|
blob
|
history
diff --git
a/glib/ghash.c
b/glib/ghash.c
index
de05efd
..
23f4a44
100644
(file)
--- a/
glib/ghash.c
+++ b/
glib/ghash.c
@@
-809,6
+809,15
@@
iter_remove_or_steal (RealIter *ri, gboolean notify)
* otherwise you have to make sure that any dynamically allocated
* values are freed yourself.
*
+ * It is safe to continue iterating the #GHashTable afterward:
+ * |[
+ * while (g_hash_table_iter_next (&iter, &key, &value))
+ * {
+ * if (condition)
+ * g_hash_table_iter_remove (&iter);
+ * }
+ * ]|
+ *
* Since: 2.16
*/
void