|
@@ -87,6 +87,27 @@ g_list_free_full (GList * list, GDestroyNotify free_func)
|
|
|
g_list_free (list);
|
|
|
}
|
|
|
|
|
|
+/* --------------------------------------------------------------------------------------------- */
|
|
|
+
|
|
|
#endif /* ! GLIB_CHECK_VERSION (2, 28, 0) */
|
|
|
|
|
|
+#if ! GLIB_CHECK_VERSION (2, 32, 0)
|
|
|
+/**
|
|
|
+ * g_queue_free_full:
|
|
|
+ * @queue: a pointer to a #GQueue
|
|
|
+ * @free_func: the function to be called to free each element's data
|
|
|
+ *
|
|
|
+ * Convenience method, which frees all the memory used by a #GQueue,
|
|
|
+ * and calls the specified destroy function on every element's data.
|
|
|
+ *
|
|
|
+ * Since: 2.32
|
|
|
+ */
|
|
|
+void
|
|
|
+g_queue_free_full (GQueue * queue, GDestroyNotify free_func)
|
|
|
+{
|
|
|
+ g_queue_foreach (queue, (GFunc) free_func, NULL);
|
|
|
+ g_queue_free (queue);
|
|
|
+}
|
|
|
+#endif /* ! GLIB_CHECK_VERSION (2, 32, 0) */
|
|
|
+
|
|
|
/* --------------------------------------------------------------------------------------------- */
|