Export glib_init via GLIB_PRIVATE_CALL

This will be used in the next commit to call glib_init from the
gobject constructor, to ensure proper constructor ordering with
non-GNU libc.

https://bugzilla.gnome.org/show_bug.cgi?id=756139
This commit is contained in:
Matthias Clasen 2015-10-06 19:45:38 -04:00
parent 342d329685
commit e0dce8a9ae
4 changed files with 8 additions and 1 deletions

View File

@ -228,7 +228,7 @@ g_debug_init (void)
g_mem_gc_friendly = flags & 1;
}
static void
void
glib_init (void)
{
static gboolean glib_inited;

View File

@ -25,6 +25,7 @@
extern GLogLevelFlags g_log_always_fatal;
extern GLogLevelFlags g_log_msg_prefix;
void glib_init (void);
void g_quark_init (void);
#ifdef G_OS_WIN32

View File

@ -20,6 +20,7 @@
#include "config.h"
#include "glib-private.h"
#include "glib-init.h"
/**
* glib__private__:
@ -32,6 +33,8 @@ GLibPrivateVTable *
glib__private__ (void)
{
static GLibPrivateVTable table = {
glib_init,
g_wakeup_new,
g_wakeup_free,
g_wakeup_get_pollfd,

View File

@ -61,6 +61,9 @@ typedef struct {
guint flags);
GDir * (* g_dir_new_from_dirp) (gpointer dirp);
/* See glib-init.c */
void (* glib_init) (void);
/* Add other private functions here, initialize them in glib-private.c */
} GLibPrivateVTable;