[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: omission in lua_yield docs
- From: Patrick Donnelly <batrick@...>
- Date: Sun, 27 May 2012 00:06:20 -0400
On Sat, May 26, 2012 at 10:40 PM, John Belmonte <email@example.com> wrote:
> I noticed that the lua_yield / yieldk docs in 5.1 and 5.2 don't define
> the return value of the function. Â(If I understand correctly it's the
> number of arguments placed on the stack by lua_resume.)
lua_yield(k) never returns to the caller (in Lua 5.1, you are always
supposed to tail call; in Lua 5.2, it actually longjmps).
In regular Lua code, yield does return the arguments passed via
resume. Not in C though.
- Patrick Donnelly