Skip to main content

WasmEdge_TableInstanceCreateWithInit

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 initial value.

The caller owns the object and should call WasmEdge_TableInstanceDelete to destroy it if the returned object is not added to a WasmEdge_ModuleInstanceContext. The value type of the default initial value should be 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 initial value is a null reference.

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

\returns pointer to context, NULL if failed.