[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Replaced print function return stack getting emptied
- From: Kevin Martin <kev82@...>
- Date: Sun, 6 May 2012 21:20:02 +0100
On 6 May 2012, at 17:52, Bruce Wheaton wrote:
> It gets called and works fine - leave the stack with the original stack, plus a function and my new results, and returns the number of results. It works with 1 or more results.
From the lua 5.2 manual:
Whenever Lua calls C, the called function gets a new stack, which is independent of previous stacks and of stacks of C functions that are still active. This stack initially contains any arguments to the C function and it is where the C function pushes its results to be returned to the caller (see lua_CFunction).