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

Function call_r_v

example/hostref.c:61–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59}
60
61void call_r_v(const wasm_func_t* func, wasm_ref_t* ref) {
62 printf("call_r_v... "); fflush(stdout);
63 wasm_val_t vs[1] = { WASM_REF_VAL(ref) };
64 wasm_val_vec_t args = WASM_ARRAY_VEC(vs);
65 wasm_val_vec_t results = WASM_EMPTY_VEC;
66 if (wasm_func_call(func, &args, &results)) {
67 printf("> Error calling function!\n");
68 exit(1);
69 }
70 printf("okay\n");
71}
72
73own wasm_ref_t* call_r_r(const wasm_func_t* func, wasm_ref_t* ref) {
74 printf("call_r_r... "); fflush(stdout);

Callers 1

mainFunction · 0.70

Calls 1

wasm_func_callFunction · 0.85

Tested by

no test coverage detected