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:
@ -29,7 +29,7 @@ thread(void *arg)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
func = wasm_runtime_lookup_function(module_inst, "sum", NULL);
|
||||
func = wasm_runtime_lookup_function(module_inst, "sum");
|
||||
if (!func) {
|
||||
printf("failed to lookup function sum");
|
||||
wasm_runtime_destroy_thread_env();
|
||||
@ -57,7 +57,7 @@ wamr_thread_cb(wasm_exec_env_t exec_env, void *arg)
|
||||
wasm_function_inst_t func;
|
||||
uint32 argv[2];
|
||||
|
||||
func = wasm_runtime_lookup_function(module_inst, "sum", NULL);
|
||||
func = wasm_runtime_lookup_function(module_inst, "sum");
|
||||
if (!func) {
|
||||
printf("failed to lookup function sum");
|
||||
return NULL;
|
||||
@ -133,7 +133,7 @@ main(int argc, char *argv[])
|
||||
goto fail4;
|
||||
}
|
||||
|
||||
func = wasm_runtime_lookup_function(wasm_module_inst, "sum", NULL);
|
||||
func = wasm_runtime_lookup_function(wasm_module_inst, "sum");
|
||||
if (!func) {
|
||||
printf("failed to lookup function sum");
|
||||
goto fail5;
|
||||
|
||||
Reference in New Issue
Block a user