Add API wasm_runtime_set_module_inst (#1286)
Add API wasm_runtime_set_module_inst, per request from #1275
This commit is contained in:
@ -178,6 +178,13 @@ wasm_exec_env_get_module_inst(WASMExecEnv *exec_env)
|
||||
return exec_env->module_inst;
|
||||
}
|
||||
|
||||
void
|
||||
wasm_exec_env_set_module_inst(WASMExecEnv *exec_env,
|
||||
WASMModuleInstanceCommon *const module_inst)
|
||||
{
|
||||
exec_env->module_inst = module_inst;
|
||||
}
|
||||
|
||||
void
|
||||
wasm_exec_env_set_thread_info(WASMExecEnv *exec_env)
|
||||
{
|
||||
|
||||
@ -255,6 +255,10 @@ wasm_exec_env_get_cur_frame(WASMExecEnv *exec_env)
|
||||
struct WASMModuleInstanceCommon *
|
||||
wasm_exec_env_get_module_inst(WASMExecEnv *exec_env);
|
||||
|
||||
void
|
||||
wasm_exec_env_set_module_inst(
|
||||
WASMExecEnv *exec_env, struct WASMModuleInstanceCommon *const module_inst);
|
||||
|
||||
void
|
||||
wasm_exec_env_set_thread_info(WASMExecEnv *exec_env);
|
||||
|
||||
|
||||
@ -1180,6 +1180,13 @@ wasm_runtime_get_module_inst(WASMExecEnv *exec_env)
|
||||
return wasm_exec_env_get_module_inst(exec_env);
|
||||
}
|
||||
|
||||
void
|
||||
wasm_runtime_set_module_inst(WASMExecEnv *exec_env,
|
||||
WASMModuleInstanceCommon *const module_inst)
|
||||
{
|
||||
wasm_exec_env_set_module_inst(exec_env, module_inst);
|
||||
}
|
||||
|
||||
void *
|
||||
wasm_runtime_get_function_attachment(WASMExecEnv *exec_env)
|
||||
{
|
||||
|
||||
@ -507,6 +507,11 @@ wasm_runtime_destroy_exec_env(WASMExecEnv *exec_env);
|
||||
WASM_RUNTIME_API_EXTERN WASMModuleInstanceCommon *
|
||||
wasm_runtime_get_module_inst(WASMExecEnv *exec_env);
|
||||
|
||||
/* See wasm_export.h for description */
|
||||
WASM_RUNTIME_API_EXTERN void
|
||||
wasm_runtime_set_module_inst(WASMExecEnv *exec_env,
|
||||
WASMModuleInstanceCommon *const module_inst);
|
||||
|
||||
/* See wasm_export.h for description */
|
||||
WASM_RUNTIME_API_EXTERN void *
|
||||
wasm_runtime_get_function_attachment(WASMExecEnv *exec_env);
|
||||
|
||||
Reference in New Issue
Block a user