mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 06:56:14 +01:00
GType: Use guintptr as the underlying storage if larger than gsize
This is required for CHERI systems such as Arm Morello, where gsize is not large enough to hold a pointer. As GType can contain pointers, we have to use guintptr instead.
This commit is contained in:
parent
70c66766f7
commit
4b111f1650
@ -421,9 +421,11 @@ G_BEGIN_DECLS
|
|||||||
* A numerical value which represents the unique identifier of a registered
|
* A numerical value which represents the unique identifier of a registered
|
||||||
* type.
|
* type.
|
||||||
*/
|
*/
|
||||||
#if GLIB_SIZEOF_SIZE_T != GLIB_SIZEOF_LONG || !defined (G_CXX_STD_VERSION)
|
#if GLIB_SIZEOF_VOID_P > GLIB_SIZEOF_SIZE_T
|
||||||
|
typedef guintptr GType;
|
||||||
|
#elif GLIB_SIZEOF_SIZE_T != GLIB_SIZEOF_LONG || !defined (G_CXX_STD_VERSION)
|
||||||
typedef gsize GType;
|
typedef gsize GType;
|
||||||
#else /* for historic reasons, C++ links against gulong GTypes */
|
#else /* for historic reasons, C++ on non-Morello/CHERI systems links against gulong GTypes */
|
||||||
typedef gulong GType;
|
typedef gulong GType;
|
||||||
#endif
|
#endif
|
||||||
typedef struct _GValue GValue;
|
typedef struct _GValue GValue;
|
||||||
|
Loading…
Reference in New Issue
Block a user