|
@@ -96,3 +96,24 @@ g_strcmp0 (const char *str1, const char *str2)
|
|
|
#endif /* ! GLIB_CHECK_VERSION (2, 16, 0) */
|
|
|
|
|
|
/* --------------------------------------------------------------------------------------------- */
|
|
|
+
|
|
|
+#if ! GLIB_CHECK_VERSION (2, 28, 0)
|
|
|
+/**
|
|
|
+ * g_slist_free_full:
|
|
|
+ * @list: a pointer to a #GSList
|
|
|
+ * @free_func: the function to be called to free each element's data
|
|
|
+ *
|
|
|
+ * Convenience method, which frees all the memory used by a #GSList, and
|
|
|
+ * calls the specified destroy function on every element's data.
|
|
|
+ *
|
|
|
+ * Since: 2.28
|
|
|
+ **/
|
|
|
+void
|
|
|
+g_slist_free_full (GSList * list, GDestroyNotify free_func)
|
|
|
+{
|
|
|
+ g_slist_foreach (list, (GFunc) free_func, NULL);
|
|
|
+ g_slist_free (list);
|
|
|
+}
|
|
|
+#endif /* ! GLIB_CHECK_VERSION (2, 28, 0) */
|
|
|
+
|
|
|
+/* --------------------------------------------------------------------------------------------- */
|