From 08f914b2904a9b56e33e7d89d46605b9348f4dbe Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Wed, 15 Nov 2023 11:04:47 +0000 Subject: [PATCH 1/2] gobject: Ensure gobject from builddir is used when generating GLib-2.0.gir Otherwise the installed one will be used, which will mean that new API will not be available when linking. Signed-off-by: Philip Withnall --- gobject/meson.build | 1 + 1 file changed, 1 insertion(+) diff --git a/gobject/meson.build b/gobject/meson.build index b7b693890..7a95121f9 100644 --- a/gobject/meson.build +++ b/gobject/meson.build @@ -190,6 +190,7 @@ if enable_gir '-DGLIB_COMPILATION', '-DGETTEXT_PACKAGE="dummy"', '--symbol-prefix=glib', + '--library-path=' + meson.current_build_dir(), '--library=gobject-2.0', ], ) From 4ef365e5d08e519179e70f6d9ba0b8f82ab8bcb1 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Wed, 15 Nov 2023 11:04:27 +0000 Subject: [PATCH 2/2] ghmac: Add a boxed type so it can be introspected properly Signed-off-by: Philip Withnall --- gobject/gboxed.c | 1 + gobject/glib-types.h | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/gobject/gboxed.c b/gobject/gboxed.c index 2deaff401..57df1e07f 100644 --- a/gobject/gboxed.c +++ b/gobject/gboxed.c @@ -138,6 +138,7 @@ G_DEFINE_BOXED_TYPE (GTimeZone, g_time_zone, g_time_zone_ref, g_time_zone_unref) G_DEFINE_BOXED_TYPE (GKeyFile, g_key_file, g_key_file_ref, g_key_file_unref) G_DEFINE_BOXED_TYPE (GMappedFile, g_mapped_file, g_mapped_file_ref, g_mapped_file_unref) G_DEFINE_BOXED_TYPE (GBookmarkFile, g_bookmark_file, g_bookmark_file_copy, g_bookmark_file_free) +G_DEFINE_BOXED_TYPE (GHmac, g_hmac, g_hmac_ref, g_hmac_unref) G_DEFINE_BOXED_TYPE (GMainLoop, g_main_loop, g_main_loop_ref, g_main_loop_unref) G_DEFINE_BOXED_TYPE (GMainContext, g_main_context, g_main_context_ref, g_main_context_unref) diff --git a/gobject/glib-types.h b/gobject/glib-types.h index 87065b980..d1a34ba5a 100644 --- a/gobject/glib-types.h +++ b/gobject/glib-types.h @@ -336,6 +336,15 @@ typedef gsize GType; */ #define G_TYPE_BOOKMARK_FILE (g_bookmark_file_get_type ()) +/** + * G_TYPE_HMAC: + * + * The #GType for a boxed type holding a #GHmac. + * + * Since: 2.80 + */ +#define G_TYPE_HMAC (g_hmac_get_type ()) + GOBJECT_AVAILABLE_IN_ALL GType g_date_get_type (void) G_GNUC_CONST; GOBJECT_AVAILABLE_IN_ALL @@ -400,6 +409,8 @@ GOBJECT_AVAILABLE_IN_2_70 GType g_pattern_spec_get_type (void) G_GNUC_CONST; GOBJECT_AVAILABLE_IN_2_76 GType g_bookmark_file_get_type (void) G_GNUC_CONST; +GOBJECT_AVAILABLE_IN_2_80 +GType g_hmac_get_type (void) G_GNUC_CONST; GOBJECT_DEPRECATED_FOR('G_TYPE_VARIANT') GType g_variant_get_gtype (void) G_GNUC_CONST;