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

Function createConf

test/api/helper.cpp:46–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44} // namespace
45
46WasmEdge_ConfigureContext *createConf(const Configure &Conf) {
47 auto *Cxt = WasmEdge_ConfigureCreate();
48 for (auto &I : ProposalList) {
49 if (!Conf.hasProposal(I)) {
50 WasmEdge_ConfigureRemoveProposal(Cxt, static_cast<WasmEdge_Proposal>(I));
51 } else {
52 WasmEdge_ConfigureAddProposal(Cxt, static_cast<WasmEdge_Proposal>(I));
53 }
54 }
55 return Cxt;
56}
57
58ErrCode convResult(WasmEdge_Result Res) {
59 return static_cast<ErrCode::Value>(WasmEdge_ResultGetCode(Res));

Callers 3

TestContextMethod · 0.85
TestContextMethod · 0.85
TestContextMethod · 0.85

Calls 4

WasmEdge_ConfigureCreateFunction · 0.85
hasProposalMethod · 0.80

Tested by 3

TestContextMethod · 0.68
TestContextMethod · 0.68
TestContextMethod · 0.68