[gjs/gnome-3-38] fix build with clang



commit 7361a1390cb39574b1565de034348047eb4526f6
Author: Marc-Antoine Perennou <Marc-Antoine Perennou com>
Date:   Thu Sep 17 08:54:56 2020 +0200

    fix build with clang
    
    Signed-off-by: Marc-Antoine Perennou <Marc-Antoine Perennou com>

 gjs/jsapi-class.h     | 4 ++--
 gjs/jsapi-util-args.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gjs/jsapi-class.h b/gjs/jsapi-class.h
index dfdde4e8..0bd502a1 100644
--- a/gjs/jsapi-class.h
+++ b/gjs/jsapi-class.h
@@ -77,11 +77,11 @@ bool gjs_define_property_dynamic(JSContext       *cx,
  *                              do_base_typecheck and priv_from_js
  */
 #define GJS_DEFINE_PRIV_FROM_JS(type, klass)                                   \
-    GJS_ALWAYS_INLINE [[nodiscard]] [[maybe_unused]] static inline bool        \
+    [[nodiscard]] [[maybe_unused]] GJS_ALWAYS_INLINE static inline bool        \
     do_base_typecheck(JSContext* cx, JS::HandleObject obj, bool throw_error) { \
         return gjs_typecheck_instance(cx, obj, &klass, throw_error);           \
     }                                                                          \
-    GJS_ALWAYS_INLINE [[nodiscard]] static inline type* priv_from_js(          \
+    [[nodiscard]] GJS_ALWAYS_INLINE static inline type* priv_from_js(          \
         JSContext* cx, JS::HandleObject obj) {                                 \
         return static_cast<type*>(                                             \
             JS_GetInstancePrivate(cx, obj, &klass, nullptr));                  \
diff --git a/gjs/jsapi-util-args.h b/gjs/jsapi-util-args.h
index 9e49df7d..b240f8dc 100644
--- a/gjs/jsapi-util-args.h
+++ b/gjs/jsapi-util-args.h
@@ -43,7 +43,7 @@
 #include "gjs/jsapi-util.h"
 #include "gjs/macros.h"
 
-GJS_ALWAYS_INLINE [[nodiscard]] static inline bool check_nullable(
+[[nodiscard]] GJS_ALWAYS_INLINE static inline bool check_nullable(
     const char*& fchar, const char*& fmt_string) {
     if (*fchar != '?')
         return false;


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