summaryrefslogtreecommitdiff
path: root/src/js
diff options
context:
space:
mode:
authorMax Graey <maxgraey@gmail.com>2021-08-27 23:44:38 +0300
committerGitHub <noreply@github.com>2021-08-27 20:44:38 +0000
commitbabd339e150ba80b0a64d6a627c07d1f557aa342 (patch)
tree71b81d113e094e8d52257e23a13c521603458217 /src/js
parentc2007eab91ed60ac4bc8a6a555e9dc3e76ef2242 (diff)
downloadbinaryen-babd339e150ba80b0a64d6a627c07d1f557aa342.tar.gz
binaryen-babd339e150ba80b0a64d6a627c07d1f557aa342.tar.bz2
binaryen-babd339e150ba80b0a64d6a627c07d1f557aa342.zip
[API] Add type argument for BinaryenAddTable method (#4107)
In the JS API this is optional and it defaults to `funcref`.
Diffstat (limited to 'src/js')
-rw-r--r--src/js/binaryen.js-post.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/js/binaryen.js-post.js b/src/js/binaryen.js-post.js
index 6ecfefee8..645290478 100644
--- a/src/js/binaryen.js-post.js
+++ b/src/js/binaryen.js-post.js
@@ -2348,8 +2348,8 @@ function wrapModule(module, self = {}) {
self['getGlobal'] = function(name) {
return preserveStack(() => Module['_BinaryenGetGlobal'](module, strToStack(name)));
};
- self['addTable'] = function(table, initial, maximum) {
- return preserveStack(() => Module['_BinaryenAddTable'](module, strToStack(table), initial, maximum));
+ self['addTable'] = function(table, initial, maximum, type = Module['_BinaryenTypeFuncref']()) {
+ return preserveStack(() => Module['_BinaryenAddTable'](module, strToStack(table), initial, maximum, type));
}
self['getTable'] = function(name) {
return preserveStack(() => Module['_BinaryenGetTable'](module, strToStack(name)));