I have a function that takes a variable number of arguments in C that I want to pass to another lua function. In pure Lua I could do something like this
function foo(...)
print(...)
end
How would I do the same thing if I were to implement the function in C?
Edit: I might have worded this poorly. What I want to do is write the function foo above, in C, using the Lua API, but I don't know how to pass the arguments I get off the Lua stack into print, because I don't know how many there are, and I can't find any way to check.