uri: Don't unconditionally use g_list_copy_deep()
authorSebastian Dröge <sebastian@centricular.com>
Mon, 29 Sep 2014 14:48:29 +0000 (17:48 +0300)
committerSebastian Dröge <sebastian@centricular.com>
Mon, 29 Sep 2014 14:48:29 +0000 (17:48 +0300)
We don't depend on GLib 2.34 yet and just for this seems a bit useless.

https://bugzilla.gnome.org/show_bug.cgi?id=737584

gst/gsturi.c

index 5333f43..4584be9 100644 (file)
@@ -118,6 +118,25 @@ _gst_ascii_strcasestr (const gchar * s, const gchar * find)
 }
 #endif
 
+#if !GLIB_CHECK_VERSION (2, 33, 4)
+#define g_list_copy_deep gst_g_list_copy_deep
+static GList *
+gst_g_list_copy_deep (GList * list, GCopyFunc func, gpointer user_data)
+{
+  list = g_list_copy (list);
+
+  if (func != NULL) {
+    GList *l;
+
+    for (l = list; l != NULL; l = l->next) {
+      l->data = func (l->data, user_data);
+    }
+  }
+
+  return list;
+}
+#endif
+
 GType
 gst_uri_handler_get_type (void)
 {