mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-28 16:36:14 +01:00
Make glib_init safe to call more than once
This will be needed to fix constructor order for non-GNU libc. https://bugzilla.gnome.org/show_bug.cgi?id=756139
This commit is contained in:
parent
46a20470fa
commit
342d329685
@ -231,6 +231,13 @@ g_debug_init (void)
|
||||
static void
|
||||
glib_init (void)
|
||||
{
|
||||
static gboolean glib_inited;
|
||||
|
||||
if (glib_inited)
|
||||
return;
|
||||
|
||||
glib_inited = TRUE;
|
||||
|
||||
g_messages_prefixed_init ();
|
||||
g_debug_init ();
|
||||
g_quark_init ();
|
||||
|
Loading…
Reference in New Issue
Block a user