Ignore autocleanups when generating introspection data

This commit is contained in:
Emmanuele Bassi 2023-10-13 12:56:48 +01:00 committed by Philip Withnall
parent 0f8aaee2bf
commit c86f469c1e
3 changed files with 12 additions and 0 deletions

View File

@ -23,6 +23,8 @@
#error "Only <gio/gio.h> can be included directly."
#endif
#ifndef __GI_SCANNER__
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GAction, g_object_unref)
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GActionMap, g_object_unref)
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GAppInfo, g_object_unref)
@ -153,3 +155,5 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC(GVolume, g_object_unref)
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GVolumeMonitor, g_object_unref)
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GZlibCompressor, g_object_unref)
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GZlibDecompressor, g_object_unref)
#endif /* __GI_SCANNER__ */

View File

@ -23,6 +23,8 @@
#error "Only <glib.h> can be included directly."
#endif
#ifndef __GI_SCANNER__
static inline void
g_autoptr_cleanup_generic_gfree (void *p)
{
@ -105,3 +107,5 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC (GPathBuf, g_path_buf_free)
G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC (GPathBuf, g_path_buf_clear)
G_GNUC_END_IGNORE_DEPRECATIONS
#endif /* __GI_SCANNER__ */

View File

@ -23,6 +23,8 @@
#error "Only <glib-object.h> can be included directly."
#endif
#ifndef __GI_SCANNER__
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GClosure, g_closure_unref)
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GEnumClass, g_type_class_unref)
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GFlagsClass, g_type_class_unref)
@ -31,3 +33,5 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC(GInitiallyUnowned, g_object_unref)
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GParamSpec, g_param_spec_unref)
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GTypeClass, g_type_class_unref)
G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC(GValue, g_value_unset)
#endif /* __GI_SCANNER__ */