| 1557 | // >>>>>>>> WasmEdge global type functions >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> |
| 1558 | |
| 1559 | WASMEDGE_CAPI_EXPORT WasmEdge_GlobalTypeContext * |
| 1560 | WasmEdge_GlobalTypeCreate(const WasmEdge_ValType ValType, |
| 1561 | const enum WasmEdge_Mutability Mut) noexcept { |
| 1562 | try { |
| 1563 | return toGlobTypeCxt(new WasmEdge::AST::GlobalType( |
| 1564 | genValType(ValType), static_cast<WasmEdge::ValMut>(Mut))); |
| 1565 | } catch (...) { |
| 1566 | handleCAPIError(); |
| 1567 | return nullptr; |
| 1568 | } |
| 1569 | } |
| 1570 | |
| 1571 | WASMEDGE_CAPI_EXPORT WasmEdge_ValType |
| 1572 | WasmEdge_GlobalTypeGetValType(const WasmEdge_GlobalTypeContext *Cxt) noexcept { |