glib worker: move to glib-private framework
authorRyan Lortie <desrt@desrt.ca>
Fri, 9 Sep 2011 18:30:25 +0000 (14:30 -0400)
committerRyan Lortie <desrt@desrt.ca>
Fri, 9 Sep 2011 18:32:00 +0000 (14:32 -0400)
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
glib/glib-private.h
glib/glib.symbols
glib/gmain.c

index 41d1620..3946e77 100644 (file)
@@ -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;
 }
 
index ef92777..b0f1fa9 100644 (file)
 #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);
index defd459..ab943bb 100644 (file)
@@ -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
index 95266b8..2862a42 100644 (file)
@@ -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;