[glib] glib worker: move to glib-private framework
- From: Ryan Lortie <ryanl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] glib worker: move to glib-private framework
- Date: Fri, 9 Sep 2011 19:20:46 +0000 (UTC)
commit d86386159d3fe1e592d813c6d8d6e293c2599231
Author: Ryan Lortie <desrt desrt ca>
Date: Fri Sep 9 14:30:25 2011 -0400
glib worker: move to glib-private framework
Remove the private glib_get_worker_context() symbol and move it over to
using the glib-private stuff like GWakeup is doing.
https://bugzilla.gnome.org/show_bug.cgi?id=657992
glib/glib-private.c | 7 ++++---
glib/glib-private.h | 24 ++++++++++++++----------
glib/glib.symbols | 1 -
glib/gmain.c | 6 +++---
4 files changed, 21 insertions(+), 17 deletions(-)
---
diff --git a/glib/glib-private.c b/glib/glib-private.c
index 41d1620..3946e77 100644
--- a/glib/glib-private.c
+++ b/glib/glib-private.c
@@ -19,7 +19,6 @@
* Author: Colin Walters <walters verbum org>
*/
-#include "gutils.h"
#include "glib-private.h"
/**
@@ -37,9 +36,11 @@ glib__private__ (void)
g_wakeup_free,
g_wakeup_get_pollfd,
g_wakeup_signal,
- g_wakeup_acknowledge
+ g_wakeup_acknowledge,
+
+ g_get_worker_context
};
-
+
return &table;
}
diff --git a/glib/glib-private.h b/glib/glib-private.h
index ef92777..b0f1fa9 100644
--- a/glib/glib-private.h
+++ b/glib/glib-private.h
@@ -20,24 +20,28 @@
#ifndef __GLIB_PRIVATE_H__
#define __GLIB_PRIVATE_H__
-#include <glib.h>
-
#include "gwakeup.h"
+#include "gmain.h"
G_BEGIN_DECLS
+G_GNUC_INTERNAL
+GMainContext * g_get_worker_context (void);
+
#define GLIB_PRIVATE_CALL(symbol) (glib__private__()->symbol)
typedef struct {
/* See gwakeup.c */
- GWakeup * (*g_wakeup_new) (void);
- void (*g_wakeup_free) (GWakeup *wakeup);
- void (*g_wakeup_get_pollfd) (GWakeup *wakeup,
- GPollFD *poll_fd);
- void (*g_wakeup_signal) (GWakeup *wakeup);
- void (*g_wakeup_acknowledge) (GWakeup *wakeup);
-
- /* Add other private functions here, initialize them in gutils.c */
+ GWakeup * (* g_wakeup_new) (void);
+ void (* g_wakeup_free) (GWakeup *wakeup);
+ void (* g_wakeup_get_pollfd) (GWakeup *wakeup,
+ GPollFD *poll_fd);
+ void (* g_wakeup_signal) (GWakeup *wakeup);
+ void (* g_wakeup_acknowledge) (GWakeup *wakeup);
+
+ /* See gmain.c */
+ GMainContext * (* g_get_worker_context) (void);
+ /* Add other private functions here, initialize them in glib-private.c */
} GLibPrivateVTable;
GLibPrivateVTable *glib__private__ (void);
diff --git a/glib/glib.symbols b/glib/glib.symbols
index defd459..ab943bb 100644
--- a/glib/glib.symbols
+++ b/glib/glib.symbols
@@ -1273,7 +1273,6 @@ g_utf16_to_ucs4
g_utf16_to_utf8
g_unichar_to_utf8
g_unichar_validate
-glib_get_worker_context
glib_pgettext
glib_gettext
#ifdef G_OS_WIN32
diff --git a/glib/gmain.c b/glib/gmain.c
index 95266b8..2862a42 100644
--- a/glib/gmain.c
+++ b/glib/gmain.c
@@ -98,7 +98,7 @@
#include "gwakeup.h"
-#include "glibprivate.h"
+#include "glib-private.h"
/**
* SECTION:main
@@ -4250,7 +4250,7 @@ ensure_unix_signal_handler_installed_unlocked (int signum)
if (!initialized)
{
sigemptyset (&installed_signal_mask);
- glib_get_worker_context ();
+ g_get_worker_context ();
initialized = TRUE;
}
@@ -4754,7 +4754,7 @@ glib_worker_main (gpointer data)
}
GMainContext *
-glib_get_worker_context (void)
+g_get_worker_context (void)
{
static gsize initialised;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]