Added backwards compatible g_list_free_full for glib < 2.28

This commit is contained in:
James Booth
2014-05-21 21:39:31 +01:00
parent e1f4465dc7
commit b3d49f2a3c
5 changed files with 12 additions and 0 deletions

View File

@@ -72,6 +72,13 @@ p_slist_free_full(GSList *items, GDestroyNotify free_func)
g_slist_free (items);
}
void
p_list_free_full(GList *items, GDestroyNotify free_func)
{
g_list_foreach (items, (GFunc) free_func, NULL);
g_list_free (items);
}
gboolean
create_dir(char *name)
{