-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert Big[Ui,I]nt64Array bindings to use [u/i]64 (#3011)
Using BigInt as the macro parameters leads to absurd signatures like slices of BigInt objects (can't exist). Instead, just use the numeric types. bindgen already converts them to bigint when appropriate. Closes: #3009 Fixes: d6d056c ("Add math-related intrinsics/functions for `JsValue`s (#2629)")
- Loading branch information
1 parent
59883ea
commit 6daa3d1
Showing
3 changed files
with
23 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
// Used for `Array.rs` tests | ||
exports.populate_array = function(arr, start, len) { | ||
exports.populate_array = function(arr, start, len) { | ||
var isBigInt = typeof(arr[0]) === "bigint"; | ||
for (i = 0; i < len; i++) { | ||
arr[i] = start + i; | ||
arr[i] = isBigInt ? BigInt(start + i) : start + i; | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters