GType: introduce GTYPE_TO_POINTER/GPOINTER_TO_TYPE

On CHERI-enabled systems we use uintptr_t as the underlying storage for
GType and therefore casting to gsize strips the upper bits from a pointer.
Fix this by casting via uintptr_t instead and introduce a new set of
macros to convert between GType and pointers.
This commit is contained in:
Alex Richardson
2022-12-14 23:55:19 +00:00
committed by Philip Withnall
parent 4b111f1650
commit d0e03f0930
9 changed files with 53 additions and 16 deletions

View File

@@ -48,6 +48,8 @@ G_TYPE_CHECK_CLASS_TYPE
G_TYPE_CHECK_VALUE
G_TYPE_CHECK_VALUE_TYPE
G_TYPE_FLAG_RESERVED_ID_BIT
GPOINTER_TO_TYPE
GTYPE_TO_POINTER
g_type_init
GTypeDebugFlags
g_type_init_with_debug_flags