summaryrefslogtreecommitdiff
path: root/src/js/binaryen.js-post.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/js/binaryen.js-post.js')
-rw-r--r--src/js/binaryen.js-post.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/js/binaryen.js-post.js b/src/js/binaryen.js-post.js
index b61b8c3e2..f387acb4f 100644
--- a/src/js/binaryen.js-post.js
+++ b/src/js/binaryen.js-post.js
@@ -1129,9 +1129,11 @@ Module['Module'] = function(module) {
return Module['_BinaryenRemoveExport'](module, strToStack(externalName));
});
};
- this['setFunctionTable'] = function(funcs) {
+ this['setFunctionTable'] = function(funcNames) {
return preserveStack(function() {
- return Module['_BinaryenSetFunctionTable'](module, i32sToStack(funcs), funcs.length);
+ return Module['_BinaryenSetFunctionTable'](module, i32sToStack(
+ funcNames.map(strToStack)
+ ), funcNames.length);
});
};
this['setMemory'] = function(initial, maximum, exportName, segments) {