[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Variable number of return values from C to lua
- From: Christophe Delépine <christophe.delepine@...>
- Date: Tue, 12 Jun 2007 17:58:26 +0200
Hello,
I have a C function that returns a variable number of values to a LUA
function :
int getBones(lua_State* l)
{
for (int i=0; i<bonesOut.getSize(); i++)
{
lua_pushnumber(l, (int)bonesOut[i]);
}
return bonesOut.getSize();
}
The LUA function does not know the number of values that are returned
How can i get the values and store them in a simple LUA table ?
Thanks