Conversation
src/node_api.cc
Outdated
There was a problem hiding this comment.
Can you update the comment above as well. It refers to NaN and the check no longer does. Would be good if the comment explained why the broader check makes sense.
There was a problem hiding this comment.
Yup, I forgot to do that.
|
@nodejs/n-api Can you please take a look? |
|
@mhdawson I also made some tweaks to the documentation, any other concerns about this change? There's a somewhat open issue about what we expect the API to do when the Number value exceeds the range of int64, but I'm not addressing that directly here other than to have a test for the current behavior. |
|
@nodejs/n-api Any thoughts on this PR? |
src/node_api.cc
Outdated
There was a problem hiding this comment.
"... values [to] match that ... "
There was a problem hiding this comment.
... and perhaps "Special[-]case all ..."
1b85199 to
c5953f1
Compare
|
I think a new CI is required at this point: https://ci.nodejs.org/job/node-test-pull-request/14061/ |
|
It looks like the Linux failure was in doc generation: https://ci.nodejs.org/job/node-test-commit-linux/17645/nodes=ubuntu1204-64/console And FreeBSD 10 failed a test: https://ci.nodejs.org/job/node-test-commit-freebsd/16725/nodes=freebsd10-64/console |
* Updated tests for `Number` and `int32_t` * Added new tests for `int64_t` * Updated N-API `int64_t` behavior to return zero for all non-finite numbers * Clarified the documentation for these calls. PR-URL: #19402 Refs: nodejs/node-chakracore#500 Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com>
|
Landed in c529168 |
* Updated tests for `Number` and `int32_t` * Added new tests for `int64_t` * Updated N-API `int64_t` behavior to return zero for all non-finite numbers * Clarified the documentation for these calls. PR-URL: nodejs#19402 Refs: nodejs/node-chakracore#500 Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* Updated tests for `Number` and `int32_t` * Added new tests for `int64_t` * Updated N-API `int64_t` behavior to return zero for all non-finite numbers * Clarified the documentation for these calls. PR-URL: #19402 Refs: nodejs/node-chakracore#500 Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com>
|
Landed on |
* Updated tests for `Number` and `int32_t` * Added new tests for `int64_t` * Updated N-API `int64_t` behavior to return zero for all non-finite numbers * Clarified the documentation for these calls. PR-URL: nodejs#19402 Refs: nodejs/node-chakracore#500 Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* Updated tests for `Number` and `int32_t` * Added new tests for `int64_t` * Updated N-API `int64_t` behavior to return zero for all non-finite numbers * Clarified the documentation for these calls. Backport-PR-URL: #19447 PR-URL: #19402 Refs: nodejs/node-chakracore#500 Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* Updated tests for `Number` and `int32_t` * Added new tests for `int64_t` * Updated N-API `int64_t` behavior to return zero for all non-finite numbers * Clarified the documentation for these calls. Backport-PR-URL: #19265 PR-URL: #19402 Refs: nodejs/node-chakracore#500 Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Also updated/added tests for
Numberandint32_tas well.Updated N-API int64 behavior to check for all non-finite numbers
instead of just NaN.
Ref: nodejs/node-chakracore#500
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes