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

VALUE_FROM_CLOSURE macro missing #7

Closed
ccntrq opened this issue Mar 6, 2017 · 3 comments
Closed

VALUE_FROM_CLOSURE macro missing #7

ccntrq opened this issue Mar 6, 2017 · 3 comments

Comments

@ccntrq
Copy link

ccntrq commented Mar 6, 2017

I wanted to try fiddling around with the embedding api allthough i think the
VALUE_FROM_CLOSURE macro mentioned in the api docs seems to be missing from the source. Can you help me out?

@marcobambini
Copy link
Owner

There is no VALUE_FROM_CLOSURE nor VALUE_FROM_FUNCTION macros.
Just use VALUE_FROM_OBJECT and pass your closure/function as argument.
For example: VALUE_FROM_OBJECT(closure).

@ccntrq
Copy link
Author

ccntrq commented Mar 6, 2017

The macro is mentioned here:

docs/api.html:108:      gravity_class_bind(c, "myfunc", VALUE_FROM_CLOSURE(closure));

I'll try using the other marco. Thanks a lot

@marcobambini
Copy link
Owner

Thanks for pointing it out, I fixed the doc.

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

No branches or pull requests

2 participants