pass function to C API
| Newsgroups | gmane.comp.mozilla.devel.jseng |
|---|---|
| Message-ID | <[email protected]> |
Hello,
I have a C API to embed. There, it is some function needing a function as argument:
typedef SPAPI SPErr (*SPPluginEntryFunc)( const char *caller, const char *selector, void *message );
...
typedef struct SPPluginsSuite {
...
SPAPI SPErr (*GetPluginHostEntry)( SPPluginRef plugin, SPPluginEntryFunc *host );
....
}
Could this be achieved in SpiderMonkey by passing some javascript implemented function to the C API?
Thank you.