mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-22 00:48:53 +02:00
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
This commit is contained in:
@@ -19,7 +19,6 @@
|
|||||||
* Author: Colin Walters <walters@verbum.org>
|
* Author: Colin Walters <walters@verbum.org>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "gutils.h"
|
|
||||||
#include "glib-private.h"
|
#include "glib-private.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -37,9 +36,11 @@ glib__private__ (void)
|
|||||||
g_wakeup_free,
|
g_wakeup_free,
|
||||||
g_wakeup_get_pollfd,
|
g_wakeup_get_pollfd,
|
||||||
g_wakeup_signal,
|
g_wakeup_signal,
|
||||||
g_wakeup_acknowledge
|
g_wakeup_acknowledge,
|
||||||
|
|
||||||
|
g_get_worker_context
|
||||||
};
|
};
|
||||||
|
|
||||||
return &table;
|
return &table;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -20,24 +20,28 @@
|
|||||||
#ifndef __GLIB_PRIVATE_H__
|
#ifndef __GLIB_PRIVATE_H__
|
||||||
#define __GLIB_PRIVATE_H__
|
#define __GLIB_PRIVATE_H__
|
||||||
|
|
||||||
#include <glib.h>
|
|
||||||
|
|
||||||
#include "gwakeup.h"
|
#include "gwakeup.h"
|
||||||
|
#include "gmain.h"
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
G_GNUC_INTERNAL
|
||||||
|
GMainContext * g_get_worker_context (void);
|
||||||
|
|
||||||
#define GLIB_PRIVATE_CALL(symbol) (glib__private__()->symbol)
|
#define GLIB_PRIVATE_CALL(symbol) (glib__private__()->symbol)
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
/* See gwakeup.c */
|
/* See gwakeup.c */
|
||||||
GWakeup * (*g_wakeup_new) (void);
|
GWakeup * (* g_wakeup_new) (void);
|
||||||
void (*g_wakeup_free) (GWakeup *wakeup);
|
void (* g_wakeup_free) (GWakeup *wakeup);
|
||||||
void (*g_wakeup_get_pollfd) (GWakeup *wakeup,
|
void (* g_wakeup_get_pollfd) (GWakeup *wakeup,
|
||||||
GPollFD *poll_fd);
|
GPollFD *poll_fd);
|
||||||
void (*g_wakeup_signal) (GWakeup *wakeup);
|
void (* g_wakeup_signal) (GWakeup *wakeup);
|
||||||
void (*g_wakeup_acknowledge) (GWakeup *wakeup);
|
void (* g_wakeup_acknowledge) (GWakeup *wakeup);
|
||||||
|
|
||||||
/* Add other private functions here, initialize them in gutils.c */
|
/* See gmain.c */
|
||||||
|
GMainContext * (* g_get_worker_context) (void);
|
||||||
|
/* Add other private functions here, initialize them in glib-private.c */
|
||||||
} GLibPrivateVTable;
|
} GLibPrivateVTable;
|
||||||
|
|
||||||
GLibPrivateVTable *glib__private__ (void);
|
GLibPrivateVTable *glib__private__ (void);
|
||||||
|
@@ -1273,7 +1273,6 @@ g_utf16_to_ucs4
|
|||||||
g_utf16_to_utf8
|
g_utf16_to_utf8
|
||||||
g_unichar_to_utf8
|
g_unichar_to_utf8
|
||||||
g_unichar_validate
|
g_unichar_validate
|
||||||
glib_get_worker_context
|
|
||||||
glib_pgettext
|
glib_pgettext
|
||||||
glib_gettext
|
glib_gettext
|
||||||
#ifdef G_OS_WIN32
|
#ifdef G_OS_WIN32
|
||||||
|
@@ -98,7 +98,7 @@
|
|||||||
|
|
||||||
#include "gwakeup.h"
|
#include "gwakeup.h"
|
||||||
|
|
||||||
#include "glibprivate.h"
|
#include "glib-private.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SECTION:main
|
* SECTION:main
|
||||||
@@ -4250,7 +4250,7 @@ ensure_unix_signal_handler_installed_unlocked (int signum)
|
|||||||
if (!initialized)
|
if (!initialized)
|
||||||
{
|
{
|
||||||
sigemptyset (&installed_signal_mask);
|
sigemptyset (&installed_signal_mask);
|
||||||
glib_get_worker_context ();
|
g_get_worker_context ();
|
||||||
initialized = TRUE;
|
initialized = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4754,7 +4754,7 @@ glib_worker_main (gpointer data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
GMainContext *
|
GMainContext *
|
||||||
glib_get_worker_context (void)
|
g_get_worker_context (void)
|
||||||
{
|
{
|
||||||
static gsize initialised;
|
static gsize initialised;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user