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 <some ver>"
text and <some ver> is fairly recent on documentation webpages.

Signed-off-by: "Lubomir I. Ivanov" <neolit123@gmail.com>

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 <dirk@hohndel.org>
This commit is contained in:
Lubomir I. Ivanov 2012-09-11 02:07:42 +03:00 committed by Dirk Hohndel
parent 2a9679dac6
commit be941e00b2

View file

@ -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 */