| 1473 | // >>>>>>>> WasmEdge table type functions >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> |
| 1474 | |
| 1475 | WASMEDGE_CAPI_EXPORT WasmEdge_TableTypeContext * |
| 1476 | WasmEdge_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 | |
| 1490 | WASMEDGE_CAPI_EXPORT WasmEdge_ValType |
| 1491 | WasmEdge_TableTypeGetRefType(const WasmEdge_TableTypeContext *Cxt) noexcept { |