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
@@ -105,7 +105,7 @@
|
||||
static void g_local_file_file_iface_init (GFileIface *iface);
|
||||
|
||||
static GFileAttributeInfoList *local_writable_attributes = NULL;
|
||||
static /* GFileAttributeInfoList * */ gsize local_writable_namespaces = 0;
|
||||
static GFileAttributeInfoList *local_writable_namespaces = NULL;
|
||||
|
||||
struct _GLocalFile
|
||||
{
|
||||
@@ -1274,7 +1274,7 @@ g_local_file_query_writable_namespaces (GFile *file,
|
||||
GVfsClass *class;
|
||||
GVfs *vfs;
|
||||
|
||||
if (g_once_init_enter (&local_writable_namespaces))
|
||||
if (g_once_init_enter_pointer (&local_writable_namespaces))
|
||||
{
|
||||
/* Writable namespaces: */
|
||||
|
||||
@@ -1297,7 +1297,7 @@ g_local_file_query_writable_namespaces (GFile *file,
|
||||
if (class->add_writable_namespaces)
|
||||
class->add_writable_namespaces (vfs, list);
|
||||
|
||||
g_once_init_leave (&local_writable_namespaces, (gsize)list);
|
||||
g_once_init_leave_pointer (&local_writable_namespaces, list);
|
||||
}
|
||||
list = (GFileAttributeInfoList *)local_writable_namespaces;
|
||||
|
||||
|
Reference in New Issue
Block a user