Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to call c function pointer in js? #21

Open
Zubnix opened this issue Sep 4, 2017 · 1 comment
Open

How to call c function pointer in js? #21

Zubnix opened this issue Sep 4, 2017 · 1 comment

Comments

@Zubnix
Copy link

Zubnix commented Sep 4, 2017

The docs mention how to define a js function and use it as a C function pointer. How would one go the other way around?

I imagine this to be trivial as the lib already does this when searching for library symbols (which are just function pointers), and giving them the appropriate calling meta information. Yet I haven't found anything easily usable in the code.

@unbornchikken
Copy link
Member

Supporting function pointers as a result type is yet to be developed feature. It shoukd work if you use the ffi compatible interface with Functions, excatly like with node-ffi, but there is no fastcall syntax and unit tests covering this fature yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants