MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / main

Function main

test/core/test_get_exported_function.cpp:17–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15typedef int (*intfunc)();
16
17int main()
18{
19 intfunc f = (intfunc)emscripten_get_exported_function("_foo");
20 intfunc b = (intfunc)emscripten_get_exported_function("_bar");
21 emscripten_outf("%d %d", f(), b());
22
23 // Obtaining the same function pointer twice should return the
24 // same address.
25 intfunc b2 = (intfunc)emscripten_get_exported_function("_bar");
26 emscripten_outf("%d", b == b2);
27}

Callers

nothing calls this directly

Calls 3

fFunction · 0.70
bFunction · 0.70
emscripten_outfFunction · 0.50

Tested by

no test coverage detected