X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=common-src%2Fglib-util.h;h=f687fcd0529f5c08afadfd5f81bbe6b9713c6c54;hb=refs%2Ftags%2Fupstream%2F3.2.1;hp=01f1331333dcb09157cc0b2c60d560af8cb2cb95;hpb=b116e9366c7b2ea2c2eb53b0a13df4090e176235;p=debian%2Famanda diff --git a/common-src/glib-util.h b/common-src/glib-util.h index 01f1331..f687fcd 100644 --- a/common-src/glib-util.h +++ b/common-src/glib-util.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2007,2008,2009 Zmanda, Inc. All Rights Reserved. + * Copyright (c) 2007, 2008, 2009, 2010 Zmanda, Inc. All Rights Reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 as published @@ -62,11 +62,16 @@ GValue* g_value_unset_init(GValue* val, GType type); * Returns its second (reset) argument.*/ GValue* g_value_unset_copy(const GValue* from, GValue * to); +/* This function is available in glib-2.28.0 and higher; for lower versions + * we build our own version with a different name */ +#if (GLIB_MAJOR_VERSION < 2 || (GLIB_MAJOR_VERSION == 2 && GLIB_MINOR_VERSION < 28)) +void slist_free_full(GSList * list, GDestroyNotify free_fn); +#else +#define slist_free_full(list, free_fn) g_slist_free_full((list), (free_fn)) +#endif + /* These functions all take a GLib container, and call free() on all the * pointers in the container before free()ing the container itself. */ -void g_list_free_full(GList * list); -void g_slist_free_full(GSList * list); -void g_slist_free_full_gpointer(gpointer list); void g_queue_free_full(GQueue * queue); void g_ptr_array_free_full(GPtrArray * array);