MCPcopy Create free account
hub / github.com/WasmEdge/WasmEdge / WasmEdge_TableInstanceCreate

Function WasmEdge_TableInstanceCreate

lib/api/wasmedge.cpp:2735–2751  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2733// >>>>>>>> WasmEdge table instance functions >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2734
2735WASMEDGE_CAPI_EXPORT WasmEdge_TableInstanceContext *
2736WasmEdge_TableInstanceCreate(
2737 const WasmEdge_TableTypeContext *TabType) noexcept {
2738 try {
2739 if (TabType) {
2740 const AST::TableType &TType = *fromTabTypeCxt(TabType);
2741 if (!TType.getRefType().isNullableRefType()) {
2742 spdlog::error(WasmEdge::ErrCode::Value::NonNullRequired);
2743 return nullptr;
2744 }
2745 return toTabCxt(new WasmEdge::Runtime::Instance::TableInstance(TType));
2746 }
2747 } catch (...) {
2748 handleCAPIError();
2749 }
2750 return nullptr;
2751}
2752
2753WASMEDGE_CAPI_EXPORT extern WasmEdge_TableInstanceContext *
2754WasmEdge_TableInstanceCreateWithInit(const WasmEdge_TableTypeContext *TabType,

Callers 2

createSpecTestModuleFunction · 0.85
TESTFunction · 0.85

Calls 4

fromTabTypeCxtFunction · 0.85
handleCAPIErrorFunction · 0.85
isNullableRefTypeMethod · 0.80
errorFunction · 0.50

Tested by 1

TESTFunction · 0.68