mirror of
				https://gitlab.gnome.org/GNOME/glib.git
				synced 2025-10-31 16:32:18 +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:
		| @@ -36,10 +36,10 @@ | |||||||
|  * Do not call this function; it is used to share private |  * Do not call this function; it is used to share private | ||||||
|  * API between glib, gobject, and gio. |  * API between glib, gobject, and gio. | ||||||
|  */ |  */ | ||||||
| GLibPrivateVTable * | const GLibPrivateVTable * | ||||||
| glib__private__ (void) | glib__private__ (void) | ||||||
| { | { | ||||||
|   static GLibPrivateVTable table = { |   static const GLibPrivateVTable table = { | ||||||
|     g_wakeup_new, |     g_wakeup_new, | ||||||
|     g_wakeup_free, |     g_wakeup_free, | ||||||
|     g_wakeup_get_pollfd, |     g_wakeup_get_pollfd, | ||||||
|   | |||||||
| @@ -295,7 +295,7 @@ typedef struct { | |||||||
| } GLibPrivateVTable; | } GLibPrivateVTable; | ||||||
|  |  | ||||||
| GLIB_AVAILABLE_IN_ALL | GLIB_AVAILABLE_IN_ALL | ||||||
| GLibPrivateVTable *glib__private__ (void); | const GLibPrivateVTable *glib__private__ (void); | ||||||
|  |  | ||||||
| /* Please see following for the use of ".ACP" over "" | /* Please see following for the use of ".ACP" over "" | ||||||
|  * on Windows, although both are accepted at compile-time |  * on Windows, although both are accepted at compile-time | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user