make these safe against removal of the current element.

Fri May 11 18:25:23 2001  Tim Janik  <timj@gtk.org>

        * gdataset.c:
        (g_dataset_foreach):
        (g_datalist_foreach): make these safe against removal of the
        current element.
This commit is contained in:
Tim Janik 2001-05-11 18:05:16 +00:00 committed by Tim Janik
parent 8468ffddf0
commit d5033d53bd
10 changed files with 78 additions and 10 deletions

View File

@ -1,3 +1,10 @@
Fri May 11 18:25:23 2001 Tim Janik <timj@gtk.org>
* gdataset.c:
(g_dataset_foreach):
(g_datalist_foreach): make these safe against removal of the
current element.
2001-05-10 Havoc Pennington <hp@pobox.com>
* gmessages.c (g_log_write_prefix): change env variable to

View File

@ -1,3 +1,10 @@
Fri May 11 18:25:23 2001 Tim Janik <timj@gtk.org>
* gdataset.c:
(g_dataset_foreach):
(g_datalist_foreach): make these safe against removal of the
current element.
2001-05-10 Havoc Pennington <hp@pobox.com>
* gmessages.c (g_log_write_prefix): change env variable to

View File

@ -1,3 +1,10 @@
Fri May 11 18:25:23 2001 Tim Janik <timj@gtk.org>
* gdataset.c:
(g_dataset_foreach):
(g_datalist_foreach): make these safe against removal of the
current element.
2001-05-10 Havoc Pennington <hp@pobox.com>
* gmessages.c (g_log_write_prefix): change env variable to

View File

@ -1,3 +1,10 @@
Fri May 11 18:25:23 2001 Tim Janik <timj@gtk.org>
* gdataset.c:
(g_dataset_foreach):
(g_datalist_foreach): make these safe against removal of the
current element.
2001-05-10 Havoc Pennington <hp@pobox.com>
* gmessages.c (g_log_write_prefix): change env variable to

View File

@ -1,3 +1,10 @@
Fri May 11 18:25:23 2001 Tim Janik <timj@gtk.org>
* gdataset.c:
(g_dataset_foreach):
(g_datalist_foreach): make these safe against removal of the
current element.
2001-05-10 Havoc Pennington <hp@pobox.com>
* gmessages.c (g_log_write_prefix): change env variable to

View File

@ -1,3 +1,10 @@
Fri May 11 18:25:23 2001 Tim Janik <timj@gtk.org>
* gdataset.c:
(g_dataset_foreach):
(g_datalist_foreach): make these safe against removal of the
current element.
2001-05-10 Havoc Pennington <hp@pobox.com>
* gmessages.c (g_log_write_prefix): change env variable to

View File

@ -1,3 +1,10 @@
Fri May 11 18:25:23 2001 Tim Janik <timj@gtk.org>
* gdataset.c:
(g_dataset_foreach):
(g_datalist_foreach): make these safe against removal of the
current element.
2001-05-10 Havoc Pennington <hp@pobox.com>
* gmessages.c (g_log_write_prefix): change env variable to

View File

@ -1,3 +1,10 @@
Fri May 11 18:25:23 2001 Tim Janik <timj@gtk.org>
* gdataset.c:
(g_dataset_foreach):
(g_datalist_foreach): make these safe against removal of the
current element.
2001-05-10 Havoc Pennington <hp@pobox.com>
* gmessages.c (g_log_write_prefix): change env variable to

View File

@ -481,10 +481,13 @@ g_dataset_foreach (gconstpointer dataset_location,
G_UNLOCK (g_dataset_global);
if (dataset)
{
register GData *list;
register GData *list, *next;
for (list = dataset->datalist; list; list = list->next)
for (list = dataset->datalist; list; list = next)
{
next = list->next;
func (list->id, list->data, user_data);
}
}
}
else
@ -498,13 +501,16 @@ g_datalist_foreach (GData **datalist,
GDataForeachFunc func,
gpointer user_data)
{
register GData *list;
register GData *list, *next;
g_return_if_fail (datalist != NULL);
g_return_if_fail (func != NULL);
for (list = *datalist; list; list = list->next)
func (list->id, list->data, user_data);
for (list = *datalist; list; list = next)
{
next = list->next;
func (list->id, list->data, user_data);
}
}
void

View File

@ -481,10 +481,13 @@ g_dataset_foreach (gconstpointer dataset_location,
G_UNLOCK (g_dataset_global);
if (dataset)
{
register GData *list;
register GData *list, *next;
for (list = dataset->datalist; list; list = list->next)
for (list = dataset->datalist; list; list = next)
{
next = list->next;
func (list->id, list->data, user_data);
}
}
}
else
@ -498,13 +501,16 @@ g_datalist_foreach (GData **datalist,
GDataForeachFunc func,
gpointer user_data)
{
register GData *list;
register GData *list, *next;
g_return_if_fail (datalist != NULL);
g_return_if_fail (func != NULL);
for (list = *datalist; list; list = list->next)
func (list->id, list->data, user_data);
for (list = *datalist; list; list = next)
{
next = list->next;
func (list->id, list->data, user_data);
}
}
void