pass function to C API

[email protected]
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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.