-
Notifications
You must be signed in to change notification settings - Fork 459
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support bigint64/biguint64 in TypedArray::ElementSize() #705
support bigint64/biguint64 in TypedArray::ElementSize() #705
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
napi-inl.h
Outdated
@@ -1628,6 +1628,10 @@ inline uint8_t TypedArray::ElementSize() const { | |||
case napi_float32_array: | |||
return 4; | |||
case napi_float64_array: | |||
#ifdef NAPI_EXPERIMENTAL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
N-API BigInt support has been out of experimental and can be guarded with
#if (NAPI_VERSION >= 6)
Check out #697 for more contexts.
napi-inl.h
Outdated
@@ -1628,6 +1628,10 @@ inline uint8_t TypedArray::ElementSize() const { | |||
case napi_float32_array: | |||
return 4; | |||
case napi_float64_array: | |||
#ifdef NAPI_EXPERIMENTAL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#ifdef NAPI_EXPERIMENTAL | |
#if (NAPI_VERSION > 5) |
napi-inl.h
Outdated
#ifdef NAPI_EXPERIMENTAL | ||
case napi_bigint64_array: | ||
case napi_biguint64_array: | ||
#endif // NAPI_EXPERIMENTAL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#endif // NAPI_EXPERIMENTAL | |
#endif // NAPI_VERSION > 5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM after the changes proposed by @mhdawson will be addressed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. @fs-eire Thanks for your contribution.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM % nit
Co-Authored-By: Gabriel Schulhof <gabrielschulhof@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
PR-URL: #705 Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Nicola Del Gobbo <nicoladelgobbo@gmail.com>
Landed as 4de23c9 |
PR-URL: nodejs/node-addon-api#705 Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Nicola Del Gobbo <nicoladelgobbo@gmail.com>
PR-URL: nodejs/node-addon-api#705 Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Nicola Del Gobbo <nicoladelgobbo@gmail.com>
PR-URL: nodejs/node-addon-api#705 Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Nicola Del Gobbo <nicoladelgobbo@gmail.com>
PR-URL: nodejs/node-addon-api#705 Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Nicola Del Gobbo <nicoladelgobbo@gmail.com>
No description provided.