[glib] Export glib_init via GLIB_PRIVATE_CALL
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] Export glib_init via GLIB_PRIVATE_CALL
- Date: Thu, 8 Oct 2015 03:39:53 +0000 (UTC)
commit e0dce8a9ae77cd4430db224c3bb056d9d1882e58
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Oct 6 19:45:38 2015 -0400
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
glib/glib-init.c | 2 +-
glib/glib-init.h | 1 +
glib/glib-private.c | 3 +++
glib/glib-private.h | 3 +++
4 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/glib/glib-init.c b/glib/glib-init.c
index 405e2ad..24fb627 100644
--- a/glib/glib-init.c
+++ b/glib/glib-init.c
@@ -228,7 +228,7 @@ g_debug_init (void)
g_mem_gc_friendly = flags & 1;
}
-static void
+void
glib_init (void)
{
static gboolean glib_inited;
diff --git a/glib/glib-init.h b/glib/glib-init.h
index b56f7e2..e893d55 100644
--- a/glib/glib-init.h
+++ b/glib/glib-init.h
@@ -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
diff --git a/glib/glib-private.c b/glib/glib-private.c
index bbf879f..dd04e58 100644
--- a/glib/glib-private.c
+++ b/glib/glib-private.c
@@ -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,
diff --git a/glib/glib-private.h b/glib/glib-private.h
index 0a28008..198e07f 100644
--- a/glib/glib-private.h
+++ b/glib/glib-private.h
@@ -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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]