Is there a way to access a function pointer from javascript without writing 
a wasm method to retrieve it?

E.g. if I've exported functions 'foo' and 'bar', and 'foo' takes 'bar' as 
an argument, how can I make the call from javascript?

I can write another method that just returns the 'bar' pointer, something 
like

typedef void (*voidfn)();

voidfn getBar() {
   return foo;
}

 and make the call with

Module._foo(Module._getBar())

My question is can I get the bar pointer from the exports without having to 
also write and export getBar()?

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to