-
Notifications
You must be signed in to change notification settings - Fork 414
-
Notifications
You must be signed in to change notification settings - Fork 414
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
Callback TypeError: error setting return value - value is out of bounds #121
Comments
Change the ffi.Callback return value to "void" instead of "int". On Friday, April 19, 2013, Morgan Jones wrote:
|
That worked! I also tried adding a "return 1" to the end of the callback, and that also worked. Thanks very much for spotting that. |
I'm new to node-ffi, and have been learning how to use callbacks, so this may be an understanding issue. But, I'm getting an odd error after a callback works with this test case:
Here's my native lib:
Which I compile with:
gcc -dynamiclib -undefined suppress -flat_namespace -g LMNodeLib.c -o LMNodeLib.dylib
It produces this output:
Ie, the callback works, but the "all done" print never happens. For the record, I'm on OS X, node v0.10.0, and using ffi from npm, 1.2.5.
Not sure if this is a callback understanding issue on my part or a bug.
Any ideas?
The text was updated successfully, but these errors were encountered: