mirror of
https://github.com/mii443/wasmer.git
synced 2025-12-08 21:58:20 +00:00
feat(c-api) wasm_func_call handles null pointers.
This commit is contained in:
@@ -150,10 +150,13 @@ pub unsafe extern "C" fn wasm_func_delete(_func: Option<Box<wasm_func_t>>) {}
|
||||
|
||||
#[no_mangle]
|
||||
pub unsafe extern "C" fn wasm_func_call(
|
||||
func: &wasm_func_t,
|
||||
args: &wasm_val_vec_t,
|
||||
func: Option<&wasm_func_t>,
|
||||
args: Option<&wasm_val_vec_t>,
|
||||
results: &mut wasm_val_vec_t,
|
||||
) -> Option<Box<wasm_trap_t>> {
|
||||
let func = func?;
|
||||
let args = args?;
|
||||
|
||||
let params = args
|
||||
.into_slice()
|
||||
.map(|slice| {
|
||||
|
||||
Reference in New Issue
Block a user