Add wasm-c-api nested function calls sample (#652)

And enable to copy back the return value of wasm main function when calling wasm_application_execute_main, add license headers in wasm-c-api samples, fix several issues reported by klocwork.
This commit is contained in:
Wenyong Huang
2021-06-16 15:26:28 +08:00
committed by GitHub
parent 1a4aa5ac2f
commit 77c71e559a
15 changed files with 357 additions and 9 deletions

View File

@ -495,7 +495,9 @@ wasm_runtime_call_wasm_v(wasm_exec_env_t exec_env,
*
* @param module_inst the WASM module instance
* @param argc the number of arguments
* @param argv the arguments array
* @param argv the arguments array, if the main function has return value,
* *(int*)argv stores the return value of the called main function after
* this function returns.
*
* @return true if the main function is called, false otherwise and exception
* will be thrown, the caller can call wasm_runtime_get_exception to get