From 0ee6e18a06cee7ab3da94c68eefbc09d8c1f0d0d Mon Sep 17 00:00:00 2001 From: TianlongLiang <111852609+TianlongLiang@users.noreply.github.com> Date: Wed, 22 Mar 2023 17:39:08 +0800 Subject: [PATCH] Rename parameter names in wasm_runtime_instantiate (#2045) --- core/iwasm/common/wasm_runtime_common.h | 4 ++-- core/iwasm/include/wasm_export.h | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/core/iwasm/common/wasm_runtime_common.h b/core/iwasm/common/wasm_runtime_common.h index b20e12ecf..58db29e3e 100644 --- a/core/iwasm/common/wasm_runtime_common.h +++ b/core/iwasm/common/wasm_runtime_common.h @@ -508,8 +508,8 @@ wasm_runtime_deinstantiate_internal(WASMModuleInstanceCommon *module_inst, /* See wasm_export.h for description */ WASM_RUNTIME_API_EXTERN WASMModuleInstanceCommon * -wasm_runtime_instantiate(WASMModuleCommon *module, uint32 stack_size, - uint32 heap_size, char *error_buf, +wasm_runtime_instantiate(WASMModuleCommon *module, uint32 default_stack_size, + uint32 host_managed_heap_size, char *error_buf, uint32 error_buf_size); /* See wasm_export.h for description */ diff --git a/core/iwasm/include/wasm_export.h b/core/iwasm/include/wasm_export.h index 7f82b6de5..f6c0107b9 100644 --- a/core/iwasm/include/wasm_export.h +++ b/core/iwasm/include/wasm_export.h @@ -467,14 +467,14 @@ wasm_runtime_set_wasi_ns_lookup_pool(wasm_module_t module, const char *ns_lookup * Instantiate a WASM module. * * @param module the WASM module to instantiate - * @param stack_size the default stack size of the module instance when the + * @param default_stack_size the default stack size of the module instance when the * exec env's operation stack isn't created by user, e.g. API * wasm_application_execute_main() and wasm_application_execute_func() * create the operation stack internally with the stack size specified * here. And API wasm_runtime_create_exec_env() creates the operation * stack with stack size specified by its parameter, the stack size * specified here is ignored. - * @param heap_size the default heap size of the module instance, a heap will + * @param host_managed_heap_size the default heap size of the module instance, a heap will * be created besides the app memory space. Both wasm app and native * function can allocate memory from the heap. * @param error_buf buffer to output the error info if failed @@ -484,7 +484,7 @@ wasm_runtime_set_wasi_ns_lookup_pool(wasm_module_t module, const char *ns_lookup */ WASM_RUNTIME_API_EXTERN wasm_module_inst_t wasm_runtime_instantiate(const wasm_module_t module, - uint32_t stack_size, uint32_t heap_size, + uint32_t default_stack_size, uint32_t host_managed_heap_size, char *error_buf, uint32_t error_buf_size); /**