mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 03:16:17 +01:00
Call glib_init from the gobject constructor
We are using quarks in the gobject constructor, among other things, so we need to ensure that glib is being initialized first. https://bugzilla.gnome.org/show_bug.cgi?id=756139
This commit is contained in:
parent
e0dce8a9ae
commit
8d83aace10
@ -31,6 +31,7 @@
|
||||
#include "gatomicarray.h"
|
||||
#include "gobject_trace.h"
|
||||
|
||||
#include "glib-private.h"
|
||||
#include "gconstructor.h"
|
||||
|
||||
#ifdef G_ENABLE_DEBUG
|
||||
@ -4376,6 +4377,11 @@ gobject_init_ctor (void)
|
||||
TypeNode *node;
|
||||
GType type;
|
||||
|
||||
/* Ensure GLib is initialized first, see
|
||||
* https://bugzilla.gnome.org/show_bug.cgi?id=756139
|
||||
*/
|
||||
GLIB_PRIVATE_CALL (glib_init) ();
|
||||
|
||||
G_WRITE_LOCK (&type_rw_lock);
|
||||
|
||||
/* setup GObject library wide debugging flags */
|
||||
|
Loading…
Reference in New Issue
Block a user