Allow empty import array for wasm-c-api wasm_instance_new (#782)

Allow empty import array (but not NULL) for wasm-c-api wasm_instance_new,
which makes the code more robust, especially in use cases where imports
might be constructed dynamically.
And add a test case in samples/wasm-c-api/src/empty_imports.c to test it.
This commit is contained in:
Michael Martin
2021-10-12 19:06:38 +11:00
committed by GitHub
parent 8edca21df2
commit c94e752532
4 changed files with 107 additions and 1 deletions

View File

@ -123,6 +123,7 @@ set(MM_UTIL src/utils/multi_module_utils.c)
set(EXAMPLES
callback
callback_chain
empty_imports
global
hello
hostref