wasmtime_func_from_raw function
- @Native<Void Function(Pointer<
wasmtime_context_t> , Pointer<Void> , Pointer<wasmtime_func_t> )>(ffi.Pointer<wasmtime_context_t>, ffi.Pointer<ffi.Void>, ffi.Pointer<wasmtime_func_t>)>()
- Pointer<
wasmtime_context_t> context, - Pointer<
Void> raw, - Pointer<
wasmtime_func_t> ret
\brief Converts a raw nonzero funcref value from #wasmtime_val_raw_t
into a #wasmtime_func_t.
This function can be used to interpret nonzero values of the funcref field
of the #wasmtime_val_raw_t structure. It is assumed that raw does not have
a value of 0, or otherwise the program will abort.
Note that this function is unchecked and unsafe. It's only safe to pass
values learned from #wasmtime_val_raw_t with the same corresponding
#wasmtime_context_t that they were produced from. Providing arbitrary values
to raw here or cross-context values with context is UB.
Implementation
@ffi.Native<
ffi.Void Function(
ffi.Pointer<wasmtime_context_t>,
ffi.Pointer<ffi.Void>,
ffi.Pointer<wasmtime_func_t>,
)
>()
external void wasmtime_func_from_raw(
ffi.Pointer<wasmtime_context_t> context,
ffi.Pointer<ffi.Void> raw,
ffi.Pointer<wasmtime_func_t> ret,
);