Merge branch 'main' into 'main'

Better detection of the cleanup attribute.

See merge request GNOME/glib!2223
This commit is contained in:
Philip Withnall 2021-11-16 15:35:05 +00:00
commit 65368ca448
2 changed files with 3 additions and 1 deletions

View File

@ -783,6 +783,7 @@ g_macro__has_attribute_fallthrough
g_macro__has_attribute_may_alias g_macro__has_attribute_may_alias
g_macro__has_attribute___noinline__ g_macro__has_attribute___noinline__
g_macro__has_attribute_warn_unused_result g_macro__has_attribute_warn_unused_result
g_macro__has_attribute_cleanup
</SECTION> </SECTION>
<SECTION> <SECTION>

View File

@ -142,6 +142,7 @@
#define g_macro__has_attribute___deprecated__ G_GNUC_CHECK_VERSION (3, 1) #define g_macro__has_attribute___deprecated__ G_GNUC_CHECK_VERSION (3, 1)
#define g_macro__has_attribute_may_alias G_GNUC_CHECK_VERSION (3, 3) #define g_macro__has_attribute_may_alias G_GNUC_CHECK_VERSION (3, 3)
#define g_macro__has_attribute_warn_unused_result G_GNUC_CHECK_VERSION (3, 4) #define g_macro__has_attribute_warn_unused_result G_GNUC_CHECK_VERSION (3, 4)
#define g_macro__has_attribute_cleanup G_GNUC_CHECK_VERSION (3, 3)
#endif #endif
@ -1187,7 +1188,7 @@
#ifndef __GI_SCANNER__ #ifndef __GI_SCANNER__
#if defined (__GNUC__) || defined (__clang__) #if g_macro__has_attribute(cleanup)
/* these macros are private */ /* these macros are private */
#define _GLIB_AUTOPTR_FUNC_NAME(TypeName) glib_autoptr_cleanup_##TypeName #define _GLIB_AUTOPTR_FUNC_NAME(TypeName) glib_autoptr_cleanup_##TypeName