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

Unlimited parameters in function #125

Open
TheAifam5 opened this issue May 4, 2016 · 2 comments
Open

Unlimited parameters in function #125

TheAifam5 opened this issue May 4, 2016 · 2 comments

Comments

@TheAifam5
Copy link

Hi,
Its possible to make unlimited parameters like for printf in LuaIntf?
For example:

LuaBinding(luaContext).addFunction("printf", &printf)

I found this: http://lua-users.org/wiki/LuaPrintf
And i think is possible to make that.

Regards TheAifam5.

@SteveKChiu
Copy link
Owner

You can not add function with ... argument directly, there is no such binding for LuaIntf.
You can, however, implement CFunction like function to access lua stack, and having unlimited arguments.

@TheAifam5
Copy link
Author

Yea, then theoretically could be possible by using va_args and lua stack. I’m not good at this btw :D

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