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

Function get_export_func

example/hostref.c:23–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21
22
23wasm_func_t* get_export_func(const wasm_extern_vec_t* exports, size_t i) {
24 if (exports->size <= i || !wasm_extern_as_func(exports->data[i])) {
25 printf("> Error accessing function export %zu!\n", i);
26 exit(1);
27 }
28 return wasm_extern_as_func(exports->data[i]);
29}
30
31wasm_global_t* get_export_global(const wasm_extern_vec_t* exports, size_t i) {
32 if (exports->size <= i || !wasm_extern_as_global(exports->data[i])) {

Callers 1

mainFunction · 0.70

Calls 1

wasm_extern_as_funcFunction · 0.85

Tested by

no test coverage detected