lua-intf
lua-intf copied to clipboard
Unlimited parameters in function
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.
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.
Yea, then theoretically could be possible by using va_args and lua stack. I’m not good at this btw :D