mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 03:16:17 +01:00
glib: return const pointer from glib__private__()
also, make the global variable "static const". That may allow the linker to place the variable into read-only memory, so we are a bit more confident that it cannot be modified.
This commit is contained in:
parent
494f8d4d87
commit
0adb1c24d7
@ -36,10 +36,10 @@
|
||||
* Do not call this function; it is used to share private
|
||||
* API between glib, gobject, and gio.
|
||||
*/
|
||||
GLibPrivateVTable *
|
||||
const GLibPrivateVTable *
|
||||
glib__private__ (void)
|
||||
{
|
||||
static GLibPrivateVTable table = {
|
||||
static const GLibPrivateVTable table = {
|
||||
g_wakeup_new,
|
||||
g_wakeup_free,
|
||||
g_wakeup_get_pollfd,
|
||||
|
@ -295,7 +295,7 @@ typedef struct {
|
||||
} GLibPrivateVTable;
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GLibPrivateVTable *glib__private__ (void);
|
||||
const GLibPrivateVTable *glib__private__ (void);
|
||||
|
||||
/* Please see following for the use of ".ACP" over ""
|
||||
* on Windows, although both are accepted at compile-time
|
||||
|
Loading…
Reference in New Issue
Block a user