diff options
author | Daniel Wirtz <dcode@dcode.io> | 2020-11-02 16:57:37 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-02 07:57:37 -0800 |
commit | ab68c1b2ffd034f8c30d2a4820c5c708491679cb (patch) | |
tree | a408dd3e28f5a128018c309dbf144fb4b94feac1 | |
parent | 69367c09b2e26701ff4d99fec0e462c0114aac87 (diff) | |
download | binaryen-ab68c1b2ffd034f8c30d2a4820c5c708491679cb.tar.gz binaryen-ab68c1b2ffd034f8c30d2a4820c5c708491679cb.tar.bz2 binaryen-ab68c1b2ffd034f8c30d2a4820c5c708491679cb.zip |
Fix usage of `allocate` in JS (no longer takes a type argument) (#3311)
-rw-r--r-- | src/js/binaryen.js-post.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/js/binaryen.js-post.js b/src/js/binaryen.js-post.js index 3cce22411..c35c6ed29 100644 --- a/src/js/binaryen.js-post.js +++ b/src/js/binaryen.js-post.js @@ -9,7 +9,7 @@ function preserveStack(func) { } function strToStack(str) { - return str ? allocate(intArrayFromString(str), 'i8', ALLOC_STACK) : 0; + return str ? allocate(intArrayFromString(str), ALLOC_STACK) : 0; } function i32sToStack(i32s) { @@ -2289,7 +2289,7 @@ function wrapModule(module, self = {}) { const segmentOffset = new Array(segmentsLen); for (let i = 0; i < segmentsLen; i++) { const { data, offset, passive } = segments[i]; - segmentData[i] = allocate(data, 'i8', ALLOC_STACK); + segmentData[i] = allocate(data, ALLOC_STACK); segmentDataLen[i] = data.length; segmentPassive[i] = passive; segmentOffset[i] = offset; @@ -2990,7 +2990,7 @@ Module['emitText'] = function(expr) { Object.defineProperty(Module, 'readBinary', { writable: true }); Module['readBinary'] = function(data) { - const buffer = allocate(data, 'i8', ALLOC_NORMAL); + const buffer = allocate(data, ALLOC_NORMAL); const ptr = Module['_BinaryenModuleRead'](buffer, data.length); _free(buffer); return wrapModule(ptr); |