mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-05-18 19:51:57 +02: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 "gatomicarray.h"
|
||||||
#include "gobject_trace.h"
|
#include "gobject_trace.h"
|
||||||
|
|
||||||
|
#include "glib-private.h"
|
||||||
#include "gconstructor.h"
|
#include "gconstructor.h"
|
||||||
|
|
||||||
#ifdef G_ENABLE_DEBUG
|
#ifdef G_ENABLE_DEBUG
|
||||||
@ -4376,6 +4377,11 @@ gobject_init_ctor (void)
|
|||||||
TypeNode *node;
|
TypeNode *node;
|
||||||
GType type;
|
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);
|
G_WRITE_LOCK (&type_rw_lock);
|
||||||
|
|
||||||
/* setup GObject library wide debugging flags */
|
/* setup GObject library wide debugging flags */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user