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

Function WasmEdge_GlobalTypeCreate

lib/api/wasmedge.cpp:1559–1569  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1557// >>>>>>>> WasmEdge global type functions >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
1558
1559WASMEDGE_CAPI_EXPORT WasmEdge_GlobalTypeContext *
1560WasmEdge_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
1571WASMEDGE_CAPI_EXPORT WasmEdge_ValType
1572WasmEdge_GlobalTypeGetValType(const WasmEdge_GlobalTypeContext *Cxt) noexcept {

Callers 2

createSpecTestModuleFunction · 0.85
TESTFunction · 0.85

Calls 2

handleCAPIErrorFunction · 0.85
genValTypeFunction · 0.70

Tested by 1

TESTFunction · 0.68