lua-users home
lua-l archive

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

On Sat, May 26, 2012 at 10:40 PM, John Belmonte <> 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