| 1259 | } |
| 1260 | |
| 1261 | WASMEDGE_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 | |
| 1276 | WASMEDGE_CAPI_EXPORT uint32_t WasmEdge_ASTModuleListExportsLength( |
| 1277 | const WasmEdge_ASTModuleContext *Cxt) noexcept { |