diff options
author | Lubomir I. Ivanov <neolit123@gmail.com> | 2012-09-11 02:07:42 +0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2012-09-11 12:08:39 -0700 |
commit | be941e00b20cc0b8b3b46e04200ce15c3023ad23 (patch) | |
tree | 1c528c923deefe572fd9485d123d9893cdcc96a5 | |
parent | 2a9679dac62d16ad727dc111f02bf441a2d6c7e1 (diff) | |
download | subsurface-be941e00b20cc0b8b3b46e04200ce15c3023ad23.tar.gz |
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>
-rw-r--r-- | gtk-gui.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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 */ |