lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


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