gst_clear_*: Remove volatile from arguments

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
This commit is contained in:
Jan Alexander Steffens (heftig) 2018-11-05 14:07:59 +01:00
parent 1c3db34150
commit 92d5d5bc57
No known key found for this signature in database
GPG key ID: DE5E0C5F25941CA5
6 changed files with 6 additions and 6 deletions

View file

@ -687,7 +687,7 @@ gst_mini_object_unref (GstMiniObject * mini_object)
**/ **/
#undef gst_clear_mini_object #undef gst_clear_mini_object
void 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); g_clear_pointer (object_ptr, gst_mini_object_unref);
} }

View file

@ -235,7 +235,7 @@ GST_API
void gst_mini_object_unref (GstMiniObject *mini_object); void gst_mini_object_unref (GstMiniObject *mini_object);
GST_API 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) #define gst_clear_mini_object(object_ptr) g_clear_pointer ((object_ptr), gst_mini_object_unref)
GST_API GST_API

View file

@ -314,7 +314,7 @@ gst_object_ref_sink (gpointer object)
**/ **/
#undef gst_clear_object #undef gst_clear_object
void void
gst_clear_object (volatile GstObject ** object_ptr) gst_clear_object (GstObject ** object_ptr)
{ {
g_clear_pointer (object_ptr, gst_object_unref); g_clear_pointer (object_ptr, gst_object_unref);
} }

View file

@ -255,7 +255,7 @@ GST_API
void gst_object_unref (gpointer object); void gst_object_unref (gpointer object);
GST_API 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) #define gst_clear_object(object_ptr) g_clear_pointer ((object_ptr), gst_object_unref)
GST_API GST_API

View file

@ -413,7 +413,7 @@ gst_structure_free (GstStructure * structure)
**/ **/
#undef gst_clear_structure #undef gst_clear_structure
void void
gst_clear_structure (volatile GstStructure ** structure_ptr) gst_clear_structure (GstStructure ** structure_ptr)
{ {
g_clear_pointer (structure_ptr, gst_structure_free); g_clear_pointer (structure_ptr, gst_structure_free);
} }

View file

@ -134,7 +134,7 @@ GST_API
void gst_structure_free (GstStructure * structure); void gst_structure_free (GstStructure * structure);
GST_API 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) #define gst_clear_structure(structure_ptr) g_clear_pointer ((structure_ptr), gst_structure_free)
GST_API GST_API