wasmedge_sys::ffi

Function WasmEdge_TableInstanceCreate

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

Creation of the WasmEdge_TableInstanceContext.

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 default value of the elements in the output table instance will be null references with the same reference type in the table type when table grows. If the reference type of the input table type is a non-nullable value type, a non-null default init value is required. In this case, please use the WasmEdge_TableInstanceCreateWithInit API instead.

\param TabType the table type context to initialize the table instance context.

\returns pointer to context, NULL if failed.