From a6f8fe071e44b0145619c21f3bfbc90c56ab805e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Fri, 24 Jun 2022 14:46:41 +0200 Subject: [PATCH] cleanup: Replace G_GNUC_NO_INLINE with G_NO_INLINE As per this we can also now mark G_GNUC_NO_INLINE as GLIB_AVAILABLE_MACRO_IN_2_58, given that we don't have anymore headers using it. --- glib/gmacros.h | 11 ++++------- gobject/gtype.h | 8 ++++---- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/glib/gmacros.h b/glib/gmacros.h index 218ee4f25..d4e5124cf 100644 --- a/glib/gmacros.h +++ b/glib/gmacros.h @@ -235,11 +235,6 @@ * * Since: 2.58 */ -/* Note: We can’t annotate this with GLIB_AVAILABLE_MACRO_IN_2_58 because it’s - * used within the GLib headers in function declarations which are always - * evaluated when a header is included. This results in warnings in third party - * code which includes glib.h, even if the third party code doesn’t use the new - * macro itself. */ #if g_macro__has_attribute(__pure__) #define G_GNUC_PURE __attribute__((__pure__)) @@ -254,9 +249,11 @@ #endif #if g_macro__has_attribute(__noinline__) -#define G_GNUC_NO_INLINE __attribute__ ((__noinline__)) +#define G_GNUC_NO_INLINE __attribute__ ((__noinline__)) \ + GLIB_AVAILABLE_MACRO_IN_2_58 #else -#define G_GNUC_NO_INLINE +#define G_GNUC_NO_INLINE \ + GLIB_AVAILABLE_MACRO_IN_2_58 #endif /** diff --git a/gobject/gtype.h b/gobject/gtype.h index 73d665626..85c5ea2fc 100644 --- a/gobject/gtype.h +++ b/gobject/gtype.h @@ -2158,7 +2158,7 @@ type_name##_get_type (void) \ return static_g_define_type_id; \ } /* closes type_name##_get_type() */ \ \ -G_GNUC_NO_INLINE \ +G_NO_INLINE \ static GType \ type_name##_get_type_once (void) \ { \ @@ -2327,7 +2327,7 @@ type_name##_get_type (void) \ return static_g_define_type_id; \ } \ \ -G_GNUC_NO_INLINE \ +G_NO_INLINE \ static GType \ type_name##_get_type_once (void) \ { \ @@ -2364,7 +2364,7 @@ type_name##_get_type (void) \ return static_g_define_type_id; \ } \ \ -G_GNUC_NO_INLINE \ +G_NO_INLINE \ static GType \ type_name##_get_type_once (void) \ { \ @@ -2417,7 +2417,7 @@ type_name##_get_type (void) \ return static_g_define_type_id; \ } \ \ -G_GNUC_NO_INLINE \ +G_NO_INLINE \ static GType \ type_name##_get_type_once (void) \ { \