[gjs: 1/2] fix build with clang
- From: Philip Chimento <pchimento src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs: 1/2] fix build with clang
- Date: Fri, 18 Sep 2020 04:03:04 +0000 (UTC)
commit 701b03cf0634a76ba182dbf7a67ae141431ab9a5
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 dfdde4e8b..0bd502a17 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 9e49df7d1..b240f8dc4 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]