lua-users home
lua-l archive

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

2013/2/15 Patrick Donnelly <>:
> It would seem to me that this is inconsistent with the rest of the
> API. After all, you don't have to clear the stack of other items
> before calling lua_call. It would seem removing extraneous items on
> the stack on resume is the sensible and expected behavior.

If you want to be consistent with lua_call, you wouldn't remove the
values but let them there, still accessible after lua_resume returns,
but not accessible to the coroutine itself (in the continuation
function). Or maybe that's what you meant (ie. removing them from the
grasp of the continuation).