wasmtime_anyref_i31_get_s function

  1. @Native<Bool Function(Pointer<wasmtime_context_t>, Pointer<wasmtime_anyref_t>, Pointer<Int32>)>(ffi.Pointer<wasmtime_context_t>, ffi.Pointer<wasmtime_anyref_t>, ffi.Pointer<ffi.Int32>)>()
bool wasmtime_anyref_i31_get_s(
  1. Pointer<wasmtime_context_t> context,
  2. Pointer<wasmtime_anyref_t> anyref,
  3. Pointer<Int32> dst
)

\brief Get the anyref's underlying i31ref value, sign extended, if any.

If the given anyref is an instance of i31ref, then its value is sign extended to 32 bits, written to dst, and true is returned.

If the given anyref is not an instance of i31ref, then false is returned and dst is left unmodified.

Implementation

@ffi.Native<
  ffi.Bool Function(
    ffi.Pointer<wasmtime_context_t>,
    ffi.Pointer<wasmtime_anyref_t>,
    ffi.Pointer<ffi.Int32>,
  )
>()
external bool wasmtime_anyref_i31_get_s(
  ffi.Pointer<wasmtime_context_t> context,
  ffi.Pointer<wasmtime_anyref_t> anyref,
  ffi.Pointer<ffi.Int32> dst,
);