wasmtime_global_new function
- @Native<Pointer<
wasmtime_error_t> Function(Pointer<wasmtime_context_t> store, Pointer<wasm_globaltype_t> type, Pointer<wasmtime_val_t> val, Pointer<wasmtime_global_t> ret)>(ffi.Pointer<wasmtime_context_t>, ffi.Pointer<wasm_globaltype_t>, ffi.Pointer<wasmtime_val_t>, ffi.Pointer<wasmtime_global_t>)>()
- Pointer<
wasmtime_context_t> store, - Pointer<
wasm_globaltype_t> type, - Pointer<
wasmtime_val_t> val, - Pointer<
wasmtime_global_t> ret,
\brief Creates a new global value.
Creates a new host-defined global value within the provided store
\param store the store in which to create the global \param type the wasm type of the global being created \param val the initial value of the global \param ret a return pointer for the created global.
This function may return an error if the val argument does not match the
specified type of the global, or if val comes from a different store than
the one provided.
This function does not take ownership of any of its arguments but error is owned by the caller.
Implementation
@ffi.Native<
ffi.Pointer<wasmtime_error_t> Function(
ffi.Pointer<wasmtime_context_t>,
ffi.Pointer<wasm_globaltype_t>,
ffi.Pointer<wasmtime_val_t>,
ffi.Pointer<wasmtime_global_t>,
)
>()
external ffi.Pointer<wasmtime_error_t> wasmtime_global_new(
ffi.Pointer<wasmtime_context_t> store,
ffi.Pointer<wasm_globaltype_t> type,
ffi.Pointer<wasmtime_val_t> val,
ffi.Pointer<wasmtime_global_t> ret,
);