Thanks Alon, I will try that out. On Monday, May 9, 2016 at 6:05:47 AM UTC+8, Alon Zakai wrote: > > With Runtime.addFunction, you can turn a JS function into a C function > pointer, which is just an integer, representing the index in the list of > indirectly-callable functions. In C and C++, that integer is exactly the > same as a regular C and C++ function pointer. I believe std::function can > wrap regular C function pointers, so that should be possible. > > On Sat, May 7, 2016 at 11:20 AM, awt <[email protected] <javascript:>> > wrote: > >> Hi, >> >> I understand that we can pass Javascript functions to C++ as function >> pointers but is it possible to pass it as a std::function? >> >> -- >> 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] <javascript:>. >> For more options, visit https://groups.google.com/d/optout. >> > >
-- 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.
