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

Function WasmEdge_MemoryTypeCreate

lib/api/wasmedge.cpp:1515–1525  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1513// >>>>>>>> WasmEdge memory type functions >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
1514
1515WASMEDGE_CAPI_EXPORT WasmEdge_MemoryTypeContext *
1516WasmEdge_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
1527WASMEDGE_CAPI_EXPORT const WasmEdge_LimitContext *
1528WasmEdge_MemoryTypeGetLimit(const WasmEdge_MemoryTypeContext *Cxt) noexcept {

Callers 3

createSpecTestModuleFunction · 0.85
TESTFunction · 0.85
mainFunction · 0.85

Calls 2

toMemTypeCxtFunction · 0.85
handleCAPIErrorFunction · 0.85

Tested by 1

TESTFunction · 0.68