I'm not considering that approach anymore since you turned me on to libraries, but I'll explain what I meant.
I was looking to use addFunction to provide the linkage to JS. All the examples I could find of those C functions had no arguments. I was trying to figure out how to pass arguments to JS. If I included args in the C function declaration would JS magically know what was expected on the stack? As you can see I'm having trouble with basic emscripten concepts. On Wed, Feb 19, 2014 at 1:14 PM, Alon Zakai <[email protected]> wrote: > What do you mean by "return parameters with the function pointer call"? > > - Alon > > > > On Wed, Feb 19, 2014 at 11:35 AM, Mark Hahn <[email protected]> wrote: > >> > Just grep for `test_add_function` >> >> That's weird. A github search didn't find it. A windows search didn't >> find it. I had to do a linux grep to find it. >> >> As to my second question, is there a way to return parameters with the >> function pointer call? I guess I could return the stack pointer and pull >> the arguments than way but that would be a pain. I wish I could get embind >> working. >> >> >> >> On Wed, Feb 19, 2014 at 11:22 AM, Alon Zakai <[email protected]> wrote: >> >>> Just grep for `test_add_function` in the `tests/` directory. Looks like >>> it is in `tests/test_core.py`, which means it is run by `python >>> tests/runner.py test_add_function`. >>> >>> - Alon >>> >>> >>> >>> On Tue, Feb 18, 2014 at 9:13 PM, Mark Hahn <[email protected]> wrote: >>> >>>> I'll check it out. I just assumed that libraries communicated like >>>> everwhere else and were just a collection of modules. >>>> >>>> Speaking of checking out code in `tests`, I've been going crazy trying >>>> to find a test `test_add_function` mentioned in the wiki. It says to look >>>> in runner.py but I can't find anything there. When I search all of the repo >>>> with github I get the code for it but I can't find any examples anywhere. >>>> I'm particularly interested in how to pass parameters to javascript when >>>> using the function pointer. Any help would be appreciated. >>>> >>>> -- >>>> 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/groups/opt_out. >>>> >>> >>> -- >>> 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/groups/opt_out. >>> >> >> -- >> 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/groups/opt_out. >> > > -- > 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/groups/opt_out. > -- 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/groups/opt_out.
