mirror of
https://github.com/mii443/wasmer.git
synced 2025-12-08 21:58:20 +00:00
feat(c-api) More functions handle null pointers.
This commit is contained in:
@@ -210,6 +210,8 @@ pub unsafe extern "C" fn wasm_func_result_arity(func: &wasm_func_t) -> usize {
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn wasm_func_type(func: &wasm_func_t) -> Box<wasm_functype_t> {
|
||||
Box::new(wasm_functype_t::new(func.inner.ty().clone()))
|
||||
pub extern "C" fn wasm_func_type(func: Option<&wasm_func_t>) -> Option<Box<wasm_functype_t>> {
|
||||
let func = func?;
|
||||
|
||||
Some(Box::new(wasm_functype_t::new(func.inner.ty().clone())))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user