mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-02 07:36:17 +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