[gjs: 4/21] macros: Move GJS_ALWAYS_INLINE to macros.h



commit 1672026710c41ea84d5dae7aaf39b8624198a6fc
Author: Philip Chimento <philip chimento gmail com>
Date:   Sun May 19 16:01:58 2019 -0700

    macros: Move GJS_ALWAYS_INLINE to macros.h
    
    This way, the macro can be used without including all of jsapi-util.h.

 gjs/jsapi-util.h | 5 -----
 gjs/macros.h     | 6 ++++++
 2 files changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/gjs/jsapi-util.h b/gjs/jsapi-util.h
index 5addf59a..1863237b 100644
--- a/gjs/jsapi-util.h
+++ b/gjs/jsapi-util.h
@@ -34,11 +34,6 @@
 #include "gjs/macros.h"
 #include "jsapi-wrapper.h"
 
-#ifdef __GNUC__
-#define GJS_ALWAYS_INLINE __attribute__((always_inline))
-#else
-#define GJS_ALWAYS_INLINE
-#endif
 
 struct GjsAutoTakeOwnership {};
 
diff --git a/gjs/macros.h b/gjs/macros.h
index 111141d4..5f36b1e0 100644
--- a/gjs/macros.h
+++ b/gjs/macros.h
@@ -64,4 +64,10 @@
  */
 #define GJS_JSAPI_RETURN_CONVENTION GJS_USE
 
+#ifdef __GNUC__
+#    define GJS_ALWAYS_INLINE __attribute__((always_inline))
+#else
+#    define GJS_ALWAYS_INLINE
+#endif
+
 #endif /* GJS_MACROS_H */


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