Update WebAssembly C API submodule to latest commit. (#2579)

* Update WebAssembly C API submodule to latest commit.

This commit updates the WebAssembly C API submodule (for `wasm.h`) to the
latest commit out of master.

This fixes the behavior of `wasm_name_new_from_string` such that it no longer
copies the null character into the name, which caused unexpected failures when
using the Wasmtime linker as imports wouldn't resolve when the null was
present.

Along with this change were breaking changes to `wasm_func_call`, the host
callback signatures, and `wasm_instance_new` to take a vector type instead of a
pointer to an unsized array.

As a result, Wasmtime language bindings based on the C API will need to be
updated once this change is pulled in.

Fixes #2211.
Fixes #2131.

* Update Doxygen comments for wasm.h changes.
This commit is contained in:
Peter Huene
2021-01-14 07:36:12 -08:00
committed by GitHub
parent cde07b9a79
commit f94db6556c
19 changed files with 207 additions and 144 deletions

View File

@@ -100,7 +100,9 @@ int main() {
assert(linking1_externs.size == 1);
wasm_func_t *run = wasm_extern_as_func(linking1_externs.data[0]);
assert(run != NULL);
error = wasmtime_func_call(run, NULL, 0, NULL, 0, &trap);
wasm_val_vec_t args_vec = WASM_EMPTY_VEC;
wasm_val_vec_t results_vec = WASM_EMPTY_VEC;
error = wasmtime_func_call(run, &args_vec, &results_vec, &trap);
if (error != NULL || trap != NULL)
exit_with_error("failed to call run", error, trap);