mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-23 17:38:54 +02:00
Revert "Optimize g_[s]list_free_full a bit"
This reverts commit 98b667d052
.
The commit was not actually an optimization, since g_list_free is
pretty smart.
This commit is contained in:
11
glib/glist.c
11
glib/glist.c
@@ -212,15 +212,10 @@ g_list_free_1 (GList *list)
|
||||
*/
|
||||
void
|
||||
g_list_free_full (GList *list,
|
||||
GDestroyNotify free_func)
|
||||
GDestroyNotify free_func)
|
||||
{
|
||||
while (list)
|
||||
{
|
||||
GList *next = list->next;
|
||||
(*free_func) (list->data);
|
||||
_g_list_free1 (list);
|
||||
list = next;
|
||||
}
|
||||
g_list_foreach (list, (GFunc) free_func, NULL);
|
||||
g_list_free (list);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user