This commit is contained in:
TAiGA 2024-05-23 15:50:48 +08:00
parent b0c2d79fd4
commit a1f74f9f22

View file

@ -93,6 +93,12 @@ typedef struct JSRefCountHeader {
#define JS_FLOAT64_NAN NAN #define JS_FLOAT64_NAN NAN
#if defined(_MSC_VER)
#define JS_VALUE_CAST(t, v) v
#else
#define JS_VALUE_CAST(t, v) (t)v
#endif
#ifdef CONFIG_CHECK_JSVALUE #ifdef CONFIG_CHECK_JSVALUE
/* JSValue consistency : it is not possible to run the code in this /* JSValue consistency : it is not possible to run the code in this
mode, but it is useful to detect simple reference counting mode, but it is useful to detect simple reference counting
@ -207,12 +213,6 @@ typedef struct JSValue {
#define JSValueConst JSValue #define JSValueConst JSValue
#if defined(_MSC_VER)
#define JS_VALUE_CAST(t, v) v
#else
#define JS_VALUE_CAST(t, v) (t)v
#endif
#define JS_VALUE_GET_TAG(v) ((int32_t)(v).tag) #define JS_VALUE_GET_TAG(v) ((int32_t)(v).tag)
/* same as JS_VALUE_GET_TAG, but return JS_TAG_FLOAT64 with NaN boxing */ /* same as JS_VALUE_GET_TAG, but return JS_TAG_FLOAT64 with NaN boxing */
#define JS_VALUE_GET_NORM_TAG(v) JS_VALUE_GET_TAG(v) #define JS_VALUE_GET_NORM_TAG(v) JS_VALUE_GET_TAG(v)