[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: c args to lus?
- From: mark greenlancer <markgreenlancer@...>
- Date: Wed, 11 Aug 2004 21:51:22 +0200
hello,
I know how to "transfer" arguments from lua to a c function
with the stack. But how to transfer args. from a called fn to lua?
If I reset the stack and put 4 numbers on the stack and return
4, lua throws an error when I call lua_tonumber(this, 1) and ff
How to do this?
I've tried it in this way.
lua_settop(l, 0);
lua_pushnumber(l, c_val+1);
lua_pushnumber(l, c_val+2);
lua_pushnumber(l, c_val+3);
lua_pushnumber(l, c_val+4);
return 4;
mark