diff options
Diffstat (limited to 'test/example')
-rw-r--r-- | test/example/c-api-kitchen-sink.c | 6 | ||||
-rw-r--r-- | test/example/c-api-multiple-tables.c | 4 |
2 files changed, 5 insertions, 5 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)); diff --git a/test/example/c-api-multiple-tables.c b/test/example/c-api-multiple-tables.c index d9d812d3d..f3a9ba8dd 100644 --- a/test/example/c-api-multiple-tables.c +++ b/test/example/c-api-multiple-tables.c @@ -31,7 +31,7 @@ int main() { BinaryenAddFunction(module, "adder", params, results, NULL, 0, add); const char* funcNames[] = {"adder"}; - BinaryenAddTable(module, "tab", 1, 1); + BinaryenAddTable(module, "tab", 1, 1, BinaryenTypeFuncref()); assert(BinaryenGetTable(module, "tab") != NULL); BinaryenAddActiveElementSegment( module, @@ -41,7 +41,7 @@ int main() { 1, BinaryenConst(module, BinaryenLiteralInt32(0))); - BinaryenAddTable(module, "t2", 1, 1); + BinaryenAddTable(module, "t2", 1, 1, BinaryenTypeFuncref()); BinaryenAddActiveElementSegment( module, "t2", |