Skip to content

Commit 41836dd

Browse files
authored
Add __main_void to NullVM. (#517)
Missed in #500, fixes #516. Signed-off-by: Piotr Sikora <code@piotrsikora.dev>
1 parent 6a10ef1 commit 41836dd

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/null/null_plugin.cc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,15 @@ void NullPlugin::getFunction(std::string_view function_name, WasmCallVoid<5> *f)
140140
}
141141
}
142142

143+
void NullPlugin::getFunction(std::string_view function_name, WasmCallWord<0> *f) {
144+
if (function_name == "__main_void") {
145+
*f = nullptr;
146+
} else if (!wasm_vm_->integration()->getNullVmFunction(function_name, true, 0, this, f)) {
147+
error("Missing getFunction for: " + std::string(function_name));
148+
*f = nullptr;
149+
}
150+
}
151+
143152
void NullPlugin::getFunction(std::string_view function_name, WasmCallWord<1> *f) {
144153
auto *plugin = this;
145154
if (function_name == "malloc") {

0 commit comments

Comments
 (0)