diff --git a/lib/win-exception-handler/src/exception_handling.rs b/lib/win-exception-handler/src/exception_handling.rs index 966432a7011..2af364b47aa 100644 --- a/lib/win-exception-handler/src/exception_handling.rs +++ b/lib/win-exception-handler/src/exception_handling.rs @@ -1,7 +1,8 @@ use std::ffi::c_void; +use std::ptr::NonNull; use wasmer_runtime_core::vm::{Ctx, Func}; -type Trampoline = unsafe extern "C" fn(*mut Ctx, *const Func, *const u64, *mut u64) -> c_void; +type Trampoline = unsafe extern "C" fn(*mut Ctx, NonNull, *const u64, *mut u64) -> c_void; type CallProtectedResult = Result<(), CallProtectedData>; #[repr(C)] @@ -16,7 +17,7 @@ extern "C" { pub fn __call_protected( trampoline: Trampoline, ctx: *mut Ctx, - func: *const Func, + func: NonNull, param_vec: *const u64, return_vec: *mut u64, out_result: *mut CallProtectedData, @@ -26,7 +27,7 @@ extern "C" { pub fn _call_protected( trampoline: Trampoline, ctx: *mut Ctx, - func: *const Func, + func: NonNull, param_vec: *const u64, return_vec: *mut u64, ) -> CallProtectedResult {