diff --git a/napi-inl.h b/napi-inl.h index d23fc83f7..f399733e6 100644 --- a/napi-inl.h +++ b/napi-inl.h @@ -376,9 +376,9 @@ inline bool Value::IsNumber() const { return Type() == napi_number; } -// currently experimental guard with version of NAPI_VERSION that it is +// currently experimental guard with definition of NAPI_EXPERIMENTAL that it is // released in once it is no longer experimental -#if (NAPI_VERSION > 2147483646) +#ifdef NAPI_EXPERIMENTAL inline bool Value::IsBigInt() const { return Type() == napi_bigint; } @@ -613,9 +613,9 @@ inline double Number::DoubleValue() const { return result; } -// currently experimental guard with version of NAPI_VERSION that it is +// currently experimental guard with definition of NAPI_EXPERIMENTAL that it is // released in once it is no longer experimental -#if (NAPI_VERSION > 2147483646) +#ifdef NAPI_EXPERIMENTAL //////////////////////////////////////////////////////////////////////////////// // BigInt Class //////////////////////////////////////////////////////////////////////////////// diff --git a/napi.h b/napi.h index d70270e54..3f2e2b03a 100644 --- a/napi.h +++ b/napi.h @@ -111,9 +111,9 @@ namespace Napi { class Value; class Boolean; class Number; -// currently experimental guard with version of NAPI_VERSION that it is +// currently experimental guard with definition of NAPI_EXPERIMENTAL that it is // released in once it is no longer experimental -#if (NAPI_VERSION > 2147483646) +#ifdef NAPI_EXPERIMENTAL class BigInt; #endif // NAPI_EXPERIMENTAL #if (NAPI_VERSION > 4) @@ -139,9 +139,9 @@ namespace Napi { typedef TypedArrayOf Uint32Array; ///< Typed-array of unsigned 32-bit integers typedef TypedArrayOf Float32Array; ///< Typed-array of 32-bit floating-point values typedef TypedArrayOf Float64Array; ///< Typed-array of 64-bit floating-point values -// currently experimental guard with version of NAPI_VERSION that it is +// currently experimental guard with definition of NAPI_EXPERIMENTAL that it is // released in once it is no longer experimental -#if (NAPI_VERSION > 2147483646) +#ifdef NAPI_EXPERIMENTAL typedef TypedArrayOf BigInt64Array; ///< Typed array of signed 64-bit integers typedef TypedArrayOf BigUint64Array; ///< Typed array of unsigned 64-bit integers #endif // NAPI_EXPERIMENTAL @@ -244,9 +244,9 @@ namespace Napi { bool IsNull() const; ///< Tests if a value is a null JavaScript value. bool IsBoolean() const; ///< Tests if a value is a JavaScript boolean. bool IsNumber() const; ///< Tests if a value is a JavaScript number. -// currently experimental guard with version of NAPI_VERSION that it is +// currently experimental guard with definition of NAPI_EXPERIMENTAL that it is // released in once it is no longer experimental -#if (NAPI_VERSION > 2147483646) +#ifdef NAPI_EXPERIMENTAL bool IsBigInt() const; ///< Tests if a value is a JavaScript bigint. #endif // NAPI_EXPERIMENTAL #if (NAPI_VERSION > 4) @@ -321,9 +321,9 @@ namespace Napi { double DoubleValue() const; ///< Converts a Number value to a 64-bit floating-point value. }; -// currently experimental guard with version of NAPI_VERSION that it is +// currently experimental guard with definition of NAPI_EXPERIMENTAL that it is // released in once it is no longer experimental -#if (NAPI_VERSION > 2147483646) +#ifdef NAPI_EXPERIMENTAL /// A JavaScript bigint value. class BigInt : public Value { public: @@ -851,9 +851,9 @@ namespace Napi { : std::is_same::value ? napi_uint32_array : std::is_same::value ? napi_float32_array : std::is_same::value ? napi_float64_array -// currently experimental guard with version of NAPI_VERSION that it is +// currently experimental guard with definition of NAPI_EXPERIMENTAL that it is // released in once it is no longer experimental -#if (NAPI_VERSION > 2147483646) +#ifdef NAPI_EXPERIMENTAL : std::is_same::value ? napi_bigint64_array : std::is_same::value ? napi_biguint64_array #endif // NAPI_EXPERIMENTAL