Remove unused argument in wasm_runtime_lookup_function and refactor WASMModuleInstance (#3218)
Remove the unused parameter `signature` from `wasm_runtime_lookup_function`. Refactor the layout of WASMModuleInstance structure: - move common data members `c_api_func_imports` and `cur_exec_env` from `WASMModuleInstanceExtraCommon` to `WASMModuleInstance` - In `WASMModuleInstance`, enlarge `reserved[3]` to `reserved[5]` in case that we need to add more fields in the future ps. https://github.com/bytecodealliance/wasm-micro-runtime/issues/2530 https://github.com/bytecodealliance/wasm-micro-runtime/issues/3202
This commit is contained in:
@ -234,19 +234,19 @@ main(int argc, char *argv[])
|
||||
|
||||
/* lookup function instance */
|
||||
if (!(wasm_cmp_externref_ptr = wasm_runtime_lookup_function(
|
||||
wasm_module_inst, "cmp-externref", NULL))) {
|
||||
wasm_module_inst, "cmp-externref"))) {
|
||||
printf("%s\n", "lookup function cmp-externref failed");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
if (!(wasm_get_externref_ptr = wasm_runtime_lookup_function(
|
||||
wasm_module_inst, "get-externref", NULL))) {
|
||||
wasm_module_inst, "get-externref"))) {
|
||||
printf("%s\n", "lookup function get-externref failed");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
if (!(wasm_set_externref_ptr = wasm_runtime_lookup_function(
|
||||
wasm_module_inst, "set-externref", NULL))) {
|
||||
wasm_module_inst, "set-externref"))) {
|
||||
printf("%s\n", "lookup function set-externref failed");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user