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

Function WasmEdge_ASTModuleListImports

lib/api/wasmedge.cpp:1261–1274  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1259}
1260
1261WASMEDGE_CAPI_EXPORT uint32_t WasmEdge_ASTModuleListImports(
1262 const WasmEdge_ASTModuleContext *Cxt,
1263 const WasmEdge_ImportTypeContext **Imports, const uint32_t Len) noexcept {
1264 if (Cxt) {
1265 const auto &ImpSec = fromASTModCxt(Cxt)->getImportSection().getContent();
1266 if (Imports) {
1267 for (uint32_t I = 0; I < Len && I < ImpSec.size(); I++) {
1268 Imports[I] = toImpTypeCxt(&ImpSec[I]);
1269 }
1270 }
1271 return static_cast<uint32_t>(ImpSec.size());
1272 }
1273 return 0;
1274}
1275
1276WASMEDGE_CAPI_EXPORT uint32_t WasmEdge_ASTModuleListExportsLength(
1277 const WasmEdge_ASTModuleContext *Cxt) noexcept {

Callers 1

TESTFunction · 0.85

Calls 2

getContentMethod · 0.45
sizeMethod · 0.45

Tested by 1

TESTFunction · 0.68