urihandler: make _get_uri() return a copy
authorTim-Philipp Müller <tim.muller@collabora.co.uk>
Sun, 13 Nov 2011 15:51:44 +0000 (15:51 +0000)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Sun, 13 Nov 2011 15:51:44 +0000 (15:51 +0000)
For thread-safety.

gst/gsturi.c
gst/gsturi.h

index 2a027f9..c987872 100644 (file)
@@ -669,11 +669,11 @@ gst_uri_handler_get_protocols (GstURIHandler * handler)
  *   Returns NULL if there are no URI currently handled. The
  *   returned string must not be modified or freed.
  */
-const gchar *
+gchar *
 gst_uri_handler_get_uri (GstURIHandler * handler)
 {
   GstURIHandlerInterface *iface;
-  const gchar *ret;
+  gchar *ret;
 
   g_return_val_if_fail (GST_IS_URI_HANDLER (handler), NULL);
 
index 5068729..b06204e 100644 (file)
@@ -87,7 +87,7 @@ struct _GstURIHandlerInterface {
   gchar **             (* get_protocols)       (GType type);
 
   /* using the interface */
-  const gchar *                (* get_uri)             (GstURIHandler * handler);
+  gchar *              (* get_uri)             (GstURIHandler * handler);
   gboolean             (* set_uri)             (GstURIHandler * handler,
                                                 const gchar *   uri);
 };
@@ -117,7 +117,7 @@ GType               gst_uri_handler_get_type        (void);
 
 guint          gst_uri_handler_get_uri_type    (GstURIHandler * handler);
 gchar **       gst_uri_handler_get_protocols   (GstURIHandler * handler);
-const gchar *  gst_uri_handler_get_uri         (GstURIHandler * handler);
+gchar *                gst_uri_handler_get_uri         (GstURIHandler * handler);
 gboolean       gst_uri_handler_set_uri         (GstURIHandler * handler,
                                                 const gchar *   uri);