mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-02 07:23:41 +02: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:
@@ -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 ();
|
||||
|
Reference in New Issue
Block a user