wasmtime_table_new function

  1. @Native<Pointer<wasmtime_error_t> Function(Pointer<wasmtime_context_t> store, Pointer<wasm_tabletype_t> ty, Pointer<wasmtime_val_t> init, Pointer<wasmtime_table_t> table)>(ffi.Pointer<wasmtime_context_t>, ffi.Pointer<wasm_tabletype_t>, ffi.Pointer<wasmtime_val_t>, ffi.Pointer<wasmtime_table_t>)>()
Pointer<wasmtime_error_t> wasmtime_table_new(
  1. Pointer<wasmtime_context_t> store,
  2. Pointer<wasm_tabletype_t> ty,
  3. Pointer<wasmtime_val_t> init,
  4. Pointer<wasmtime_table_t> table,
)

\brief Creates a new host-defined wasm table.

\param store the store to create the table within \param ty the type of the table to create \param init the initial value for this table's elements \param table where to store the returned table

This function does not take ownership of any of its parameters, but yields ownership of returned error. This function may return an error if the init value does not match ty, for example.

Implementation

@ffi.Native<
  ffi.Pointer<wasmtime_error_t> Function(
    ffi.Pointer<wasmtime_context_t>,
    ffi.Pointer<wasm_tabletype_t>,
    ffi.Pointer<wasmtime_val_t>,
    ffi.Pointer<wasmtime_table_t>,
  )
>()
external ffi.Pointer<wasmtime_error_t> wasmtime_table_new(
  ffi.Pointer<wasmtime_context_t> store,
  ffi.Pointer<wasm_tabletype_t> ty,
  ffi.Pointer<wasmtime_val_t> init,
  ffi.Pointer<wasmtime_table_t> table,
);