Node: Fix handling of large unsigned values

Closes #1269
This commit is contained in:
William S Fulton 2021-02-26 23:29:03 +00:00
commit 1d4ef62466
2 changed files with 22 additions and 0 deletions

View file

@ -7,6 +7,10 @@ the issue number to the end of the URL: https://github.com/swig/swig/issues/
Version 4.1.0 (in progress)
===========================
2021-02-26: murillo128, wsfulton
#1269 [Javascript] Fix handling of large positive unsigned long and
unsigned long long values.
2021-02-24: tomleavy, yegorich, tungntpham
#1746 [Javascript] Add support for Node v12.
SWIG support is now for Node v6 and later only.

View file

@ -0,0 +1,18 @@
var integers = require("integers");
var val = 3902408827
ret = integers.signed_long_identity(val)
if (ret != val)
throw "Incorrect value: " + ret
ret = integers.unsigned_long_identity(val)
if (ret != val)
throw "Incorrect value: " + ret
ret = integers.signed_long_long_identity(val)
if (ret != val)
throw "Incorrect value: " + ret
ret = integers.unsigned_long_long_identity(val)
if (ret != val)
throw "Incorrect value: " + ret