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

Function WasmEdge_FunctionTypeGetParameters

lib/api/wasmedge.cpp:1432–1443  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1430}
1431
1432WASMEDGE_CAPI_EXPORT uint32_t WasmEdge_FunctionTypeGetParameters(
1433 const WasmEdge_FunctionTypeContext *Cxt, WasmEdge_ValType *List,
1434 const uint32_t Len) noexcept {
1435 if (Cxt) {
1436 for (uint32_t I = 0;
1437 I < fromFuncTypeCxt(Cxt)->getParamTypes().size() && I < Len; I++) {
1438 List[I] = genWasmEdge_ValType(fromFuncTypeCxt(Cxt)->getParamTypes()[I]);
1439 }
1440 return static_cast<uint32_t>(fromFuncTypeCxt(Cxt)->getParamTypes().size());
1441 }
1442 return 0;
1443}
1444
1445WASMEDGE_CAPI_EXPORT uint32_t WasmEdge_FunctionTypeGetReturnsLength(
1446 const WasmEdge_FunctionTypeContext *Cxt) noexcept {

Callers 1

TESTFunction · 0.85

Calls 3

genWasmEdge_ValTypeFunction · 0.85
getParamTypesMethod · 0.80
sizeMethod · 0.45

Tested by 1

TESTFunction · 0.68