mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-01 15:03:39 +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
@@ -48,7 +48,7 @@ ensure_trash_portal (void)
|
||||
{
|
||||
static GXdpTrash *trash = NULL;
|
||||
|
||||
if (g_once_init_enter (&trash))
|
||||
if (g_once_init_enter_pointer (&trash))
|
||||
{
|
||||
GDBusConnection *connection = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, NULL);
|
||||
GXdpTrash *proxy = NULL;
|
||||
@@ -62,7 +62,7 @@ ensure_trash_portal (void)
|
||||
g_object_unref (connection);
|
||||
}
|
||||
|
||||
g_once_init_leave (&trash, proxy);
|
||||
g_once_init_leave_pointer (&trash, proxy);
|
||||
}
|
||||
|
||||
return trash;
|
||||
|
Reference in New Issue
Block a user