mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-07-28 21:03:29 +02:00
Use g_once_init_{enter,leave}_pointer where appropriate
This should not result in any functional changes, but will eventually allow glib to be functional on CHERI-enabled systems such as Morello. Helps: https://gitlab.gnome.org/GNOME/glib/-/issues/2842
This commit is contained in:
committed by
Philip Withnall
parent
726eca7c89
commit
a1dfecf11f
@@ -1719,14 +1719,14 @@ maybe_issue_property_deprecation_warning (const GParamSpec *pspec)
|
||||
static GMutex already_warned_lock;
|
||||
gboolean already;
|
||||
|
||||
if (g_once_init_enter (&enable_diagnostic))
|
||||
if (g_once_init_enter_pointer (&enable_diagnostic))
|
||||
{
|
||||
const gchar *value = g_getenv ("G_ENABLE_DIAGNOSTIC");
|
||||
|
||||
if (!value)
|
||||
value = "0";
|
||||
|
||||
g_once_init_leave (&enable_diagnostic, value);
|
||||
g_once_init_leave_pointer (&enable_diagnostic, value);
|
||||
}
|
||||
|
||||
if (enable_diagnostic[0] == '0')
|
||||
|
Reference in New Issue
Block a user