MCPcopy
hub / github.com/jvilk/BrowserFS / getCFunc

Function getCFunc

test/tests/emscripten/nop.js:371–380  ·  view source on GitHub ↗
(ident)

Source from the content-addressed store, hash-verified

369
370// Returns the C function with a specified identifier (for C++, you need to do manual name mangling)
371function getCFunc(ident) {
372 var func = Module['_' + ident]; // closure exported function
373 if (!func) {
374 try {
375 func = eval('_' + ident); // explicit lookup
376 } catch(e) {}
377 }
378 assert(func, 'Cannot call unknown function ' + ident + ' (perhaps LLVM optimizations or closure removed it?)');
379 return func;
380}
381
382var cwrap, ccall;
383(function(){

Callers 1

nop.jsFile · 0.70

Calls 1

assertFunction · 0.70

Tested by

no test coverage detected