diff options
author | Max Graey <maxgraey@gmail.com> | 2021-08-27 23:44:38 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-27 20:44:38 +0000 |
commit | babd339e150ba80b0a64d6a627c07d1f557aa342 (patch) | |
tree | 71b81d113e094e8d52257e23a13c521603458217 /test/example/c-api-kitchen-sink.c | |
parent | c2007eab91ed60ac4bc8a6a555e9dc3e76ef2242 (diff) | |
download | binaryen-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 'test/example/c-api-kitchen-sink.c')
-rw-r--r-- | test/example/c-api-kitchen-sink.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/example/c-api-kitchen-sink.c b/test/example/c-api-kitchen-sink.c index a13d71cdb..633f4f1ff 100644 --- a/test/example/c-api-kitchen-sink.c +++ b/test/example/c-api-kitchen-sink.c @@ -319,7 +319,7 @@ void test_core() { // Tags BinaryenAddTag(module, "a-tag", BinaryenTypeInt32(), BinaryenTypeNone()); - BinaryenAddTable(module, "tab", 0, 100); + BinaryenAddTable(module, "tab", 0, 100, BinaryenTypeFuncref()); // Exception handling @@ -930,7 +930,7 @@ void test_core() { // Function table. One per module const char* funcNames[] = { BinaryenFunctionGetName(sinker) }; - BinaryenAddTable(module, "0", 1, 1); + BinaryenAddTable(module, "0", 1, 1, BinaryenTypeFuncref()); BinaryenAddActiveElementSegment( module, "0", @@ -1467,7 +1467,7 @@ void test_for_each() { BinaryenFunctionGetName(fns[2]) }; BinaryenExpressionRef constExprRef = BinaryenConst(module, BinaryenLiteralInt32(0)); - BinaryenAddTable(module, "0", 1, 1); + BinaryenAddTable(module, "0", 1, 1, BinaryenTypeFuncref()); BinaryenAddActiveElementSegment( module, "0", "0", funcNames, 3, constExprRef); assert(1 == BinaryenGetNumElementSegments(module)); |