mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-26 02:00:33 +00:00
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:
parent
1c3db34150
commit
92d5d5bc57
6 changed files with 6 additions and 6 deletions
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue