mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-07-30 05:43:28 +02:00
gobject: Make g_clear_object take a non-volatile GObject **
The implementation is silently discarding this anyway, and g_object_unref() is using atomic operations. So this should be safe. Having this here triggers -Wdiscarded-qualifiers when g_clear_pointer() is fixed to use __typeof__().
This commit is contained in:
@@ -3378,7 +3378,7 @@ g_object_unref (gpointer _object)
|
||||
**/
|
||||
#undef g_clear_object
|
||||
void
|
||||
g_clear_object (volatile GObject **object_ptr)
|
||||
g_clear_object (GObject **object_ptr)
|
||||
{
|
||||
g_clear_pointer (object_ptr, g_object_unref);
|
||||
}
|
||||
|
Reference in New Issue
Block a user