gst_clear_*: Remove volatile from arguments
authorJan Alexander Steffens (heftig) <jan.steffens@gmail.com>
Mon, 5 Nov 2018 13:07:59 +0000 (14:07 +0100)
committerJan Alexander Steffens (heftig) <jan.steffens@gmail.com>
Mon, 5 Nov 2018 13:16:36 +0000 (14:16 +0100)
g_clear_pointer is not thread-safe and never was. GLib similarly removed
the volatile from g_clear_object in 2aacef39b1.

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/issues/327

gst/gstminiobject.c
gst/gstminiobject.h
gst/gstobject.c
gst/gstobject.h
gst/gststructure.c
gst/gststructure.h

index 324346c..b55ff58 100644 (file)
@@ -687,7 +687,7 @@ gst_mini_object_unref (GstMiniObject * mini_object)
  **/
 #undef gst_clear_mini_object
 void
-gst_clear_mini_object (volatile GstMiniObject ** object_ptr)
+gst_clear_mini_object (GstMiniObject ** object_ptr)
 {
   g_clear_pointer (object_ptr, gst_mini_object_unref);
 }
index b9d3314..cfd7562 100644 (file)
@@ -235,7 +235,7 @@ GST_API
 void            gst_mini_object_unref          (GstMiniObject *mini_object);
 
 GST_API
-void        gst_clear_mini_object (volatile GstMiniObject **object_ptr);
+void        gst_clear_mini_object (GstMiniObject **object_ptr);
 #define     gst_clear_mini_object(object_ptr) g_clear_pointer ((object_ptr), gst_mini_object_unref)
 
 GST_API
index f5683a0..3aa20c4 100644 (file)
@@ -314,7 +314,7 @@ gst_object_ref_sink (gpointer object)
  **/
 #undef gst_clear_object
 void
-gst_clear_object (volatile GstObject ** object_ptr)
+gst_clear_object (GstObject ** object_ptr)
 {
   g_clear_pointer (object_ptr, gst_object_unref);
 }
index 5fe5a18..bcf6c41 100644 (file)
@@ -255,7 +255,7 @@ GST_API
 void           gst_object_unref                (gpointer object);
 
 GST_API
-void        gst_clear_object (volatile GstObject **object_ptr);
+void        gst_clear_object (GstObject **object_ptr);
 #define     gst_clear_object(object_ptr) g_clear_pointer ((object_ptr), gst_object_unref)
 
 GST_API
index dae2b63..b6f3d2e 100644 (file)
@@ -413,7 +413,7 @@ gst_structure_free (GstStructure * structure)
  **/
 #undef gst_clear_structure
 void
-gst_clear_structure (volatile GstStructure ** structure_ptr)
+gst_clear_structure (GstStructure ** structure_ptr)
 {
   g_clear_pointer (structure_ptr, gst_structure_free);
 }
index 624b6e6..8e6b972 100644 (file)
@@ -134,7 +134,7 @@ GST_API
 void                  gst_structure_free                 (GstStructure        * structure);
 
 GST_API
-void                  gst_clear_structure                (volatile GstStructure **structure_ptr);
+void                  gst_clear_structure                (GstStructure **structure_ptr);
 #define               gst_clear_structure(structure_ptr) g_clear_pointer ((structure_ptr), gst_structure_free)
 
 GST_API