MCPcopy Create free account
hub / github.com/WebAssembly/wasm-c-api / call_ir_v

Function call_ir_v

example/hostref.c:87–97  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

85}
86
87void call_ir_v(const wasm_func_t* func, int32_t i, wasm_ref_t* ref) {
88 printf("call_ir_v... "); fflush(stdout);
89 wasm_val_t vs[2] = { WASM_I32_VAL(i), WASM_REF_VAL(ref) };
90 wasm_val_vec_t args = WASM_ARRAY_VEC(vs);
91 wasm_val_vec_t results = WASM_EMPTY_VEC;
92 if (wasm_func_call(func, &args, &results)) {
93 printf("> Error calling function!\n");
94 exit(1);
95 }
96 printf("okay\n");
97}
98
99own wasm_ref_t* call_i_r(const wasm_func_t* func, int32_t i) {
100 printf("call_i_r... "); fflush(stdout);

Callers 1

mainFunction · 0.70

Calls 1

wasm_func_callFunction · 0.85

Tested by

no test coverage detected