wasmedge_sys::ffi

Function WasmEdge_TableInstanceCreateWithInit

Source
pub unsafe extern "C" fn WasmEdge_TableInstanceCreateWithInit(
    TabType: *const WasmEdge_TableTypeContext,
    Value: WasmEdge_Value,
) -> *mut WasmEdge_TableInstanceContext
Expand description

Creation of the WasmEdge_TableInstanceContext with the default init value.

The caller owns the object and should call WasmEdge_TableInstanceDelete to destroy it if the returned object is not added into a WasmEdge_ModuleInstanceContext. The value type of the default init value should compatible with the reference type of the input table type, otherwise this function will fail. If the reference type of the input table type is a non-nullable value type, this function will fail if the default init value is a null reference.

\param TabType the table type context to initialize the table instance context. \param Value the default init value for the table element when table grows.

\returns pointer to context, NULL if failed.