<div dir="ltr">ack<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Apr 11, 2014 at 10:43 AM, Christophe Fergeau <span dir="ltr"><<a href="mailto:cfergeau@redhat.com" target="_blank">cfergeau@redhat.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This was introduced in glib 2.32 and the webdav channel uses it.<br>
---<br>
 gtk/glib-compat.c | 22 ++++++++++++++++++++++<br>
 gtk/glib-compat.h |  3 +++<br>
 2 files changed, 25 insertions(+)<br>
<br>
diff --git a/gtk/glib-compat.c b/gtk/glib-compat.c<br>
index f940e0a..9d1165e 100644<br>
--- a/gtk/glib-compat.c<br>
+++ b/gtk/glib-compat.c<br>
@@ -100,6 +100,28 @@ g_slist_free_full (GSList         *list,<br>
 G_DEFINE_BOXED_TYPE (GMainContext, spice_main_context, g_main_context_ref, g_main_context_unref)<br>
 #endif<br>
<br>
+<br>
+#if !GLIB_CHECK_VERSION(2,32,0)<br>
+/**<br>
+ * g_queue_free_full:<br>
+ * @queue: a pointer to a #GQueue<br>
+ * @free_func: the function to be called to free each element's data<br>
+ *<br>
+ * Convenience method, which frees all the memory used by a #GQueue,<br>
+ * and calls the specified destroy function on every element's data.<br>
+ *<br>
+ * Since: 2.32<br>
+ */<br>
+void<br>
+g_queue_free_full (GQueue        *queue,<br>
+                  GDestroyNotify  free_func)<br>
+{<br>
+  g_queue_foreach (queue, (GFunc) free_func, NULL);<br>
+  g_queue_free (queue);<br>
+}<br>
+#endif<br>
+<br>
+<br>
 #if !GLIB_CHECK_VERSION(2,27,2)<br>
 guint64 g_get_monotonic_time(void)<br>
 {<br>
diff --git a/gtk/glib-compat.h b/gtk/glib-compat.h<br>
index 4acf401..45d961e 100644<br>
--- a/gtk/glib-compat.h<br>
+++ b/gtk/glib-compat.h<br>
@@ -112,6 +112,9 @@ GType spice_main_context_get_type (void) G_GNUC_CONST;<br>
<br>
 #if !GLIB_CHECK_VERSION(2,32,0)<br>
 # define G_SIGNAL_DEPRECATED (1 << 9)<br>
+void<br>
+g_queue_free_full (GQueue        *queue,<br>
+                   GDestroyNotify  free_func);<br>
 #endif<br>
<br>
 #ifndef g_clear_pointer<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.9.0<br>
<br>
_______________________________________________<br>
Spice-devel mailing list<br>
<a href="mailto:Spice-devel@lists.freedesktop.org">Spice-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/spice-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/spice-devel</a><br>
</font></span></blockquote></div><br><br clear="all"><br>-- <br>Marc-André Lureau
</div>