From be941e00b20cc0b8b3b46e04200ce15c3023ad23 Mon Sep 17 00:00:00 2001 From: "Lubomir I. Ivanov" Date: Tue, 11 Sep 2012 02:07:42 +0300 Subject: Inline g_list_free_full for better compatibility Replaced g_list_free_full with the inlined alternave: g_list_foreach(dive_trip_list, (GFunc)free, NULL); g_list_free(dive_trip_list); once again my version on debian 6.0.x has libraries up-to-date yet outdated. i guess i have to suggest against API which has the "Since " text and is fairly recent on documentation webpages. Signed-off-by: "Lubomir I. Ivanov" I took only one hunk from the patch that Lubomir sent - the rest I implemented differently in the previous commit. Signed-off-by: Dirk Hohndel --- gtk-gui.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gtk-gui.c b/gtk-gui.c index d24675927..e520d9b75 100644 --- a/gtk-gui.c +++ b/gtk-gui.c @@ -313,7 +313,11 @@ static void file_close(GtkWidget *w, gpointer data) free(get_dive(i)); dive_table.nr = 0; dive_table.preexisting = 0; - g_list_free_full(dive_trip_list, free); + + /* inlined version of g_list_free_full(dive_trip_list, free); */ + g_list_foreach(dive_trip_list, (GFunc)free, NULL); + g_list_free(dive_trip_list); + dive_trip_list = NULL; /* clear the selection and the statistics */ -- cgit v1.2.3-70-g09d2