Merge branch 'wip/smcv/gsize-is-guintptr' into 'main'

gdk: Codify the requirement that gsize is pointer-sized

See merge request GNOME/gtk!7514
This commit is contained in:
Benjamin Otte 2024-07-28 14:12:59 +00:00
commit 76c1ea0449

View File

@ -43,6 +43,14 @@
#include <fribidi.h>
/* GTK has a general architectural assumption that gsize is pointer-sized
* (equivalent to uintptr_t), making it non-portable to architectures like
* CHERI where that isn't true. If a future release relaxes that
* assumption, changes will be needed in numerous places.
* See also https://gitlab.gnome.org/GNOME/glib/-/issues/2842 for the
* equivalent in GLib, which would be a prerequisite. */
G_STATIC_ASSERT (sizeof (gsize) == sizeof (void *));
G_STATIC_ASSERT (G_ALIGNOF (gsize) == G_ALIGNOF (void *));
/**
* GDK_WINDOWING_X11: