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

Function check

example/hostref.c:113–122  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

111}
112
113void check(own wasm_ref_t* actual, const wasm_ref_t* expected) {
114 if (actual != expected &&
115 !(actual && expected && wasm_ref_same(actual, expected))) {
116 printf("> Error reading reference, expected %p, got %p\n",
117 expected ? wasm_ref_get_host_info(expected) : NULL,
118 actual ? wasm_ref_get_host_info(actual) : NULL);
119 exit(1);
120 }
121 if (actual) wasm_ref_delete(actual);
122}
123
124
125int main(int argc, const char* argv[]) {

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected