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

Function get_export_memory

example/memory.c:11–17  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9
10
11wasm_memory_t* get_export_memory(const wasm_extern_vec_t* exports, size_t i) {
12 if (exports->size <= i || !wasm_extern_as_memory(exports->data[i])) {
13 printf("> Error accessing memory export %zu!\n", i);
14 exit(1);
15 }
16 return wasm_extern_as_memory(exports->data[i]);
17}
18
19wasm_func_t* get_export_func(const wasm_extern_vec_t* exports, size_t i) {
20 if (exports->size <= i || !wasm_extern_as_func(exports->data[i])) {

Callers 1

mainFunction · 0.70

Calls 1

wasm_extern_as_memoryFunction · 0.85

Tested by

no test coverage detected