We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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 set the lua side of a void argument in C?
example:
C side: cat libtest.c
int five(void) { return 5; }
lua side:
so = require"alien" tst = so.load("test") tst.five:types("int", "void")
assert( tst.five() == 5) -- error: two few arguments (function five)
assert( tst.five(1) == 5) -- error: paramenter 2 is of unknow type (function five)
take around the bug:
so = require"alien" tst = so.load("test") tst.five:types("int", "int") assert( tst.five(0) == 5) -- ok
The text was updated successfully, but these errors were encountered:
No branches or pull requests
How to set the lua side of a void argument in C?
example:
C side:
cat libtest.c
int five(void) {
return 5;
}
lua side:
so = require"alien"
tst = so.load("test")
tst.five:types("int", "void")
assert( tst.five() == 5) -- error: two few arguments (function five)
assert( tst.five(1) == 5) -- error: paramenter 2 is of unknow type (function five)
take around the bug:
so = require"alien"
tst = so.load("test")
tst.five:types("int", "int")
assert( tst.five(0) == 5) -- ok
The text was updated successfully, but these errors were encountered: