mirror of
https://github.com/mii443/wasmer.git
synced 2025-12-07 05:08:19 +00:00
Fix func_calls to not pass NULL but WASM_EMPTY_VEC
This commit is contained in:
@@ -171,7 +171,10 @@ int main(int argc, char* argv[]) {
|
||||
print_wasmer_error();
|
||||
return -1;
|
||||
}
|
||||
own wasm_trap_t* trap = wasm_func_call(start_function, NULL, NULL);
|
||||
|
||||
wasm_val_vec_t args = WASM_EMPTY_VEC;
|
||||
wasm_val_vec_t results = WASM_EMPTY_VEC;
|
||||
own wasm_trap_t* trap = wasm_func_call(start_function, &args, &results);
|
||||
if (trap) {
|
||||
fprintf(stderr, "Trap is not NULL: TODO:\n");
|
||||
return -1;
|
||||
|
||||
@@ -115,7 +115,7 @@ fn run_c_compile(
|
||||
|
||||
#[test]
|
||||
fn object_file_engine_works() -> anyhow::Result<()> {
|
||||
let temp_dir = tempfile::tempdir()?;
|
||||
let temp_dir = tempfile::tempdir().context("Making a temp dir")?;
|
||||
let operating_dir: PathBuf = temp_dir.path().to_owned();
|
||||
|
||||
let wasm_path = operating_dir.join(object_file_engine_test_wasm_path());
|
||||
|
||||
@@ -60,7 +60,6 @@ int main() {
|
||||
|
||||
wasm_extern_vec_t imports;
|
||||
wasm_extern_vec_new_uninitialized(&imports, import_types.size);
|
||||
|
||||
wasm_importtype_vec_delete(&import_types);
|
||||
|
||||
bool get_imports_result = wasi_get_imports(store, module, wasi_env, &imports);
|
||||
@@ -89,13 +88,15 @@ int main() {
|
||||
}
|
||||
|
||||
fflush(stdout);
|
||||
own wasm_trap_t* trap = wasm_func_call(start_function, NULL, NULL);
|
||||
|
||||
wasm_val_vec_t args = WASM_EMPTY_VEC;
|
||||
wasm_val_vec_t results = WASM_EMPTY_VEC;
|
||||
own wasm_trap_t* trap = wasm_func_call(start_function, &args, &results);
|
||||
if (trap) {
|
||||
fprintf(stderr, "Trap is not NULL: TODO:\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
wasm_extern_vec_delete(&imports);
|
||||
wasm_instance_delete(instance);
|
||||
wasm_module_delete(module);
|
||||
wasm_store_delete(store);
|
||||
|
||||
Reference in New Issue
Block a user