| 1513 | // >>>>>>>> WasmEdge memory type functions >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> |
| 1514 | |
| 1515 | WASMEDGE_CAPI_EXPORT WasmEdge_MemoryTypeContext * |
| 1516 | WasmEdge_MemoryTypeCreate(const WasmEdge_LimitContext *Limit) noexcept { |
| 1517 | try { |
| 1518 | if (Limit) { |
| 1519 | return toMemTypeCxt(new WasmEdge::AST::MemoryType(*fromLimitCxt(Limit))); |
| 1520 | } |
| 1521 | } catch (...) { |
| 1522 | handleCAPIError(); |
| 1523 | } |
| 1524 | return nullptr; |
| 1525 | } |
| 1526 | |
| 1527 | WASMEDGE_CAPI_EXPORT const WasmEdge_LimitContext * |
| 1528 | WasmEdge_MemoryTypeGetLimit(const WasmEdge_MemoryTypeContext *Cxt) noexcept { |