lua-users home
lua-l archive

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

On 5-Aug-05, at 5:19 AM, Mike Pall wrote:

Alas, there is no (easy) way to differentiate a yield from a hook
with a yield from the Lua function itself. So you have to decide
for one feature or the other.

Surely that is what return values are for :)

Oh, and BTW: do not mix coroutine.resume() (the Lua function)
with yielding from the line or count hook. It rips apart the
stack frame of the running Lua function. You really have to use
lua_resume() from C and carefully avoid touching the coroutine

What problem precisely are you referring to here? Is this the issue that hooks don't have call frames? Personally, I think that's a bug.