summaryrefslogtreecommitdiff
path: root/test/example/c-api-unused-mem.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/example/c-api-unused-mem.cpp')
-rw-r--r--test/example/c-api-unused-mem.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/example/c-api-unused-mem.cpp b/test/example/c-api-unused-mem.cpp
index 1c74b2dfd..49d116fdc 100644
--- a/test/example/c-api-unused-mem.cpp
+++ b/test/example/c-api-unused-mem.cpp
@@ -15,9 +15,10 @@ int main() {
BinaryenModuleAutoDrop(the_module);
{
const char* segments[] = { 0 };
+ int8_t segmentPassive[] = { 0 };
BinaryenExpressionRef segmentOffsets[] = { 0 };
BinaryenIndex segmentSizes[] = { 0 };
- BinaryenSetMemory(the_module, 256, 256, "memory", segments, segmentOffsets, segmentSizes, 0, 0);
+ BinaryenSetMemory(the_module, 256, 256, "memory", segments, segmentPassive, segmentOffsets, segmentSizes, 0, 0);
}
the_relooper = RelooperCreate(the_module);
{
@@ -56,9 +57,10 @@ int main() {
}
{
const char* segments[] = { 0 };
+ int8_t segmentPassive[] = { 0 };
BinaryenExpressionRef segmentOffsets[] = { 0 };
BinaryenIndex segmentSizes[] = { 0 };
- BinaryenSetMemory(the_module, 1024, 1024, NULL, segments, segmentOffsets, segmentSizes, 0, 0);
+ BinaryenSetMemory(the_module, 1024, 1024, NULL, segments, segmentPassive, segmentOffsets, segmentSizes, 0, 0);
}
expressions[11] = BinaryenConst(the_module, BinaryenLiteralInt32(65535));
expressions[12] = BinaryenConst(the_module, BinaryenLiteralInt32(0));
@@ -91,4 +93,3 @@ int main() {
BinaryenModuleDispose(the_module);
return 0;
}
-