Fix GHashTableIter layout for CHERI targets

Last field needs to be pointer-size to match GHashTableIter. This happened
to work for most architecture due to alignment padding/pointer size, but
for CHERI targets with 128-bit pointers RealIter ends up being smaller
than GHashTableIter.

Helps: https://gitlab.gnome.org/GNOME/glib/-/issues/2842
This commit is contained in:
Alex Richardson 2022-12-14 23:55:18 +00:00
parent 702e606f73
commit 2aed76fc94

View File

@ -292,7 +292,7 @@ typedef struct
gpointer dummy2; gpointer dummy2;
gint position; gint position;
gboolean dummy3; gboolean dummy3;
gint version; gintptr version;
} RealIter; } RealIter;
G_STATIC_ASSERT (sizeof (GHashTableIter) == sizeof (RealIter)); G_STATIC_ASSERT (sizeof (GHashTableIter) == sizeof (RealIter));