Skip to content

Commit 9d6f2bb

Browse files
authored
Bump wamr to 5e2011ca1d03d2499b00e423f2eeccf221a2370c (#13)
apply to latest wamr API modification
1 parent 506da6e commit 9d6f2bb

2 files changed

Lines changed: 3 additions & 8 deletions

File tree

crates/wamr-sys/wasm-micro-runtime

Submodule wasm-micro-runtime updated 560 files

src/function.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,8 @@ impl Function {
2828
/// Return `RuntimeError::FunctionNotFound` if failed.
2929
pub fn find_export_func(instance: &Instance, name: &str) -> Result<Function, RuntimeError> {
3030
let name = CString::new(name).expect("CString::new failed");
31-
let function = unsafe {
32-
wasm_runtime_lookup_function(
33-
instance.get_inner_instance(),
34-
name.as_ptr(),
35-
std::ptr::null(),
36-
)
37-
};
31+
let function =
32+
unsafe { wasm_runtime_lookup_function(instance.get_inner_instance(), name.as_ptr()) };
3833
match function.is_null() {
3934
true => Err(RuntimeError::FunctionNotFound),
4035
false => Ok(Function { function }),

0 commit comments

Comments
 (0)