From 70585f9a48bc5db8ddcb69e9eb322633067251c7 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Wed, 27 Sep 2023 11:48:26 +0100 Subject: [PATCH] Add value annotation to G_TYPE_FUNDAMENTAL_MAX The introspection parser isn't good enough to expand the shift symbol, which means G_TYPE_FUNDAMENTAL_MAX is evaluated as (255 << 0). We can use the `(value)` annotation to force the symbol value in the introspection data. See: GNOME/gobject-introspection#473 --- gobject/gtype.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/gobject/gtype.h b/gobject/gtype.h index c074d540e..b02121a3b 100644 --- a/gobject/gtype.h +++ b/gobject/gtype.h @@ -41,7 +41,13 @@ G_BEGIN_DECLS */ #define G_TYPE_FUNDAMENTAL(type) (g_type_fundamental (type)) /** - * G_TYPE_FUNDAMENTAL_MAX: + * G_TYPE_FUNDAMENTAL_SHIFT: + * + * Shift value used in converting numbers to type IDs. + */ +#define G_TYPE_FUNDAMENTAL_SHIFT (2) +/** + * G_TYPE_FUNDAMENTAL_MAX: (value 1020) * * An integer constant that represents the number of identifiers reserved * for types that are assigned at compile-time. @@ -207,12 +213,6 @@ G_BEGIN_DECLS * Open an issue on https://gitlab.gnome.org/GNOME/glib/issues/new for * reservations. */ -/** - * G_TYPE_FUNDAMENTAL_SHIFT: - * - * Shift value used in converting numbers to type IDs. - */ -#define G_TYPE_FUNDAMENTAL_SHIFT (2) /** * G_TYPE_MAKE_FUNDAMENTAL: * @x: the fundamental type number.