mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-08 03:45:49 +01:00
Make foreach() safe against removal of the _current_ element. While this
Thu May 3 06:38:28 2001 Owen Taylor <otaylor@redhat.com> * g[s]list.c (g_[s]list_foreach) docs/Changes-2.0.txt: Make foreach() safe against removal of the _current_ element. While this could break some code, the new behavior is consistent with the rest of GLib/GTK+ and probably is what people expect in most cases. (Suggested by Paul Kuykendall, #50071)
This commit is contained in:
parent
39f526ef20
commit
0402b625ee
@ -1,3 +1,11 @@
|
||||
Thu May 3 06:38:28 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* g[s]list.c (g_[s]list_foreach) docs/Changes-2.0.txt: Make
|
||||
foreach() safe against removal of the _current_ element. While
|
||||
this could break some code, the new behavior is consistent with
|
||||
the rest of GLib/GTK+ and probably is what people expect in most
|
||||
cases. (Suggested by Paul Kuykendall, #50071)
|
||||
|
||||
Wed May 2 11:10:22 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gutf8.c (g_utf8_to_ucs4_fast): Fix read past end of the string.
|
||||
|
@ -1,3 +1,11 @@
|
||||
Thu May 3 06:38:28 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* g[s]list.c (g_[s]list_foreach) docs/Changes-2.0.txt: Make
|
||||
foreach() safe against removal of the _current_ element. While
|
||||
this could break some code, the new behavior is consistent with
|
||||
the rest of GLib/GTK+ and probably is what people expect in most
|
||||
cases. (Suggested by Paul Kuykendall, #50071)
|
||||
|
||||
Wed May 2 11:10:22 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gutf8.c (g_utf8_to_ucs4_fast): Fix read past end of the string.
|
||||
|
@ -1,3 +1,11 @@
|
||||
Thu May 3 06:38:28 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* g[s]list.c (g_[s]list_foreach) docs/Changes-2.0.txt: Make
|
||||
foreach() safe against removal of the _current_ element. While
|
||||
this could break some code, the new behavior is consistent with
|
||||
the rest of GLib/GTK+ and probably is what people expect in most
|
||||
cases. (Suggested by Paul Kuykendall, #50071)
|
||||
|
||||
Wed May 2 11:10:22 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gutf8.c (g_utf8_to_ucs4_fast): Fix read past end of the string.
|
||||
|
@ -1,3 +1,11 @@
|
||||
Thu May 3 06:38:28 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* g[s]list.c (g_[s]list_foreach) docs/Changes-2.0.txt: Make
|
||||
foreach() safe against removal of the _current_ element. While
|
||||
this could break some code, the new behavior is consistent with
|
||||
the rest of GLib/GTK+ and probably is what people expect in most
|
||||
cases. (Suggested by Paul Kuykendall, #50071)
|
||||
|
||||
Wed May 2 11:10:22 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gutf8.c (g_utf8_to_ucs4_fast): Fix read past end of the string.
|
||||
|
@ -1,3 +1,11 @@
|
||||
Thu May 3 06:38:28 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* g[s]list.c (g_[s]list_foreach) docs/Changes-2.0.txt: Make
|
||||
foreach() safe against removal of the _current_ element. While
|
||||
this could break some code, the new behavior is consistent with
|
||||
the rest of GLib/GTK+ and probably is what people expect in most
|
||||
cases. (Suggested by Paul Kuykendall, #50071)
|
||||
|
||||
Wed May 2 11:10:22 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gutf8.c (g_utf8_to_ucs4_fast): Fix read past end of the string.
|
||||
|
@ -1,3 +1,11 @@
|
||||
Thu May 3 06:38:28 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* g[s]list.c (g_[s]list_foreach) docs/Changes-2.0.txt: Make
|
||||
foreach() safe against removal of the _current_ element. While
|
||||
this could break some code, the new behavior is consistent with
|
||||
the rest of GLib/GTK+ and probably is what people expect in most
|
||||
cases. (Suggested by Paul Kuykendall, #50071)
|
||||
|
||||
Wed May 2 11:10:22 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gutf8.c (g_utf8_to_ucs4_fast): Fix read past end of the string.
|
||||
|
@ -1,3 +1,11 @@
|
||||
Thu May 3 06:38:28 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* g[s]list.c (g_[s]list_foreach) docs/Changes-2.0.txt: Make
|
||||
foreach() safe against removal of the _current_ element. While
|
||||
this could break some code, the new behavior is consistent with
|
||||
the rest of GLib/GTK+ and probably is what people expect in most
|
||||
cases. (Suggested by Paul Kuykendall, #50071)
|
||||
|
||||
Wed May 2 11:10:22 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gutf8.c (g_utf8_to_ucs4_fast): Fix read past end of the string.
|
||||
|
@ -1,3 +1,11 @@
|
||||
Thu May 3 06:38:28 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* g[s]list.c (g_[s]list_foreach) docs/Changes-2.0.txt: Make
|
||||
foreach() safe against removal of the _current_ element. While
|
||||
this could break some code, the new behavior is consistent with
|
||||
the rest of GLib/GTK+ and probably is what people expect in most
|
||||
cases. (Suggested by Paul Kuykendall, #50071)
|
||||
|
||||
Wed May 2 11:10:22 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gutf8.c (g_utf8_to_ucs4_fast): Fix read past end of the string.
|
||||
|
@ -22,3 +22,9 @@
|
||||
|
||||
To go along with this change, the vtable for GIOChannel has changed and
|
||||
add_watch() has been replaced by create_watch().
|
||||
|
||||
* g_list_foreach() and g_slist_foreach() have been changed so they
|
||||
are now safe against removal of the current item, not the next item.
|
||||
|
||||
It's not recommended to mutate the list in the callback to these
|
||||
functions in any case.
|
@ -617,8 +617,9 @@ g_list_foreach (GList *list,
|
||||
{
|
||||
while (list)
|
||||
{
|
||||
GList *next = list->next;
|
||||
(*func) (list->data, user_data);
|
||||
list = list->next;
|
||||
list = next;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -589,8 +589,9 @@ g_slist_foreach (GSList *list,
|
||||
{
|
||||
while (list)
|
||||
{
|
||||
GSList *next = list->next;
|
||||
(*func) (list->data, user_data);
|
||||
list = list->next;
|
||||
list = next;
|
||||
}
|
||||
}
|
||||
|
||||
|
3
glist.c
3
glist.c
@ -617,8 +617,9 @@ g_list_foreach (GList *list,
|
||||
{
|
||||
while (list)
|
||||
{
|
||||
GList *next = list->next;
|
||||
(*func) (list->data, user_data);
|
||||
list = list->next;
|
||||
list = next;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user