diff options
-rw-r--r-- | gjs/jsapi-util.h | 4 | ||||
-rw-r--r-- | util/log.h | 36 |
2 files changed, 20 insertions, 20 deletions
diff --git a/gjs/jsapi-util.h b/gjs/jsapi-util.h index 78cc4a9f..c26e40f8 100644 --- a/gjs/jsapi-util.h +++ b/gjs/jsapi-util.h @@ -76,7 +76,7 @@ typedef struct GjsRootedArray GjsRootedArray; * do_base_typecheck and priv_from_js */ #define GJS_DEFINE_PRIV_FROM_JS(type, klass) \ - __attribute__((unused)) static inline bool \ + G_GNUC_UNUSED static inline bool \ do_base_typecheck(JSContext *context, \ JS::HandleObject object, \ bool throw_error) \ @@ -93,7 +93,7 @@ typedef struct GjsRootedArray GjsRootedArray; JS_EndRequest(context); \ return priv; \ } \ - __attribute__((unused)) static bool \ + G_GNUC_UNUSED static bool \ priv_from_js_with_typecheck(JSContext *context, \ JS::HandleObject object, \ type **out) \ @@ -112,45 +112,45 @@ typedef enum { #endif #if GJS_VERBOSE_ENABLE_PROPS -#define gjs_debug_jsprop(topic, format...) \ - do { gjs_debug(topic, format); } while(0) +#define gjs_debug_jsprop(topic, ...) \ + do { gjs_debug(topic, __VA_ARGS__); } while(0) #else -#define gjs_debug_jsprop(topic, format...) ((void)0) +#define gjs_debug_jsprop(topic, ...) ((void)0) #endif #if GJS_VERBOSE_ENABLE_MARSHAL -#define gjs_debug_marshal(topic, format...) \ - do { gjs_debug(topic, format); } while(0) +#define gjs_debug_marshal(topic, ...) \ + do { gjs_debug(topic, __VA_ARGS__); } while(0) #else -#define gjs_debug_marshal(topic, format...) ((void)0) +#define gjs_debug_marshal(topic, ...) ((void)0) #endif #if GJS_VERBOSE_ENABLE_LIFECYCLE -#define gjs_debug_lifecycle(topic, format...) \ - do { gjs_debug(topic, format); } while(0) +#define gjs_debug_lifecycle(topic, ...) \ + do { gjs_debug(topic, __VA_ARGS__); } while(0) #else -#define gjs_debug_lifecycle(topic, format...) ((void)0) +#define gjs_debug_lifecycle(topic, ...) ((void)0) #endif #if GJS_VERBOSE_ENABLE_GI_USAGE -#define gjs_debug_gi_usage(format...) \ - do { gjs_debug(GJS_DEBUG_GI_USAGE, format); } while(0) +#define gjs_debug_gi_usage(...) \ + do { gjs_debug(GJS_DEBUG_GI_USAGE, __VA_ARGS__); } while(0) #else -#define gjs_debug_gi_usage(format...) ((void)0) +#define gjs_debug_gi_usage(...) ((void)0) #endif #if GJS_VERBOSE_ENABLE_GCLOSURE -#define gjs_debug_closure(format...) \ - do { gjs_debug(GJS_DEBUG_GCLOSURE, format); } while(0) +#define gjs_debug_closure(...) \ + do { gjs_debug(GJS_DEBUG_GCLOSURE, __VA_ARGS__); } while(0) #else -#define gjs_debug_closure(format, ...) ((void)0) +#define gjs_debug_closure(...) ((void)0) #endif #if GJS_VERBOSE_ENABLE_GSIGNAL -#define gjs_debug_gsignal(format...) \ - do { gjs_debug(GJS_DEBUG_GOBJECT, format); } while(0) +#define gjs_debug_gsignal(...) \ + do { gjs_debug(GJS_DEBUG_GOBJECT, __VA_ARGS__); } while(0) #else -#define gjs_debug_gsignal(format...) ((void)0) +#define gjs_debug_gsignal(...) ((void)0) #endif void gjs_debug(GjsDebugTopic topic, |