gitypelib: Add boxed type

This is needed because `GITypelib` is exposed in the public
libgirepository API, so needs to be introspectable.

This should fix a couple of warnings about `gi_repository_require()` and
related APIs not being introspectable as they return an unintrospectable
type.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>

Helps: #3155
This commit is contained in:
Philip Withnall 2024-02-07 14:39:54 +00:00
parent 5cc5f413f5
commit 6929632ecb
2 changed files with 6 additions and 0 deletions

View File

@ -41,6 +41,8 @@
* Since: 2.80
*/
G_DEFINE_BOXED_TYPE (GITypelib, gi_typelib, gi_typelib_ref, gi_typelib_unref)
typedef struct {
GITypelib *typelib;
GSList *context_stack;

View File

@ -36,6 +36,10 @@ G_BEGIN_DECLS
typedef struct _GITypelib GITypelib;
#define GI_TYPE_TYPELIB (gi_typelib_get_type ())
GI_AVAILABLE_IN_ALL
GType gi_typelib_get_type (void) G_GNUC_CONST;
GI_AVAILABLE_IN_ALL
GITypelib * gi_typelib_new_from_bytes (GBytes *bytes,
GError **error);