[glib: 2/4] cleanup: Replace G_GNUC_NO_INLINE with G_NO_INLINE




commit a6f8fe071e44b0145619c21f3bfbc90c56ab805e
Author: Marco Trevisan (Treviño) <mail 3v1n0 net>
Date:   Fri Jun 24 14:46:41 2022 +0200

    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 218ee4f25f..d4e5124cf1 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 73d665626b..85c5ea2fc3 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) \
 { \


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]