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

Function WasmEdge_TableTypeCreate

lib/api/wasmedge.cpp:1475–1488  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1473// >>>>>>>> WasmEdge table type functions >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
1474
1475WASMEDGE_CAPI_EXPORT WasmEdge_TableTypeContext *
1476WasmEdge_TableTypeCreate(const WasmEdge_ValType RefType,
1477 const WasmEdge_LimitContext *Limit) noexcept {
1478 try {
1479 WasmEdge::ValType RT = genValType(RefType);
1480 if (Limit && RT.isRefType()) {
1481 return toTabTypeCxt(
1482 new WasmEdge::AST::TableType(RT, *fromLimitCxt(Limit)));
1483 }
1484 } catch (...) {
1485 handleCAPIError();
1486 }
1487 return nullptr;
1488}
1489
1490WASMEDGE_CAPI_EXPORT WasmEdge_ValType
1491WasmEdge_TableTypeGetRefType(const WasmEdge_TableTypeContext *Cxt) noexcept {

Callers 2

createSpecTestModuleFunction · 0.85
TESTFunction · 0.85

Calls 4

toTabTypeCxtFunction · 0.85
handleCAPIErrorFunction · 0.85
isRefTypeMethod · 0.80
genValTypeFunction · 0.70

Tested by 1

TESTFunction · 0.68