[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: yield across metamethod/C-call boundary
- From: Mike Pall <mikelu-0608@...>
- Date: Wed, 16 Aug 2006 23:00:50 +0200
Hi,
Stefan Brantschen wrote:
> Shouldn't I see the "C-call boundary" in the stack trace? What do I
> miss?
A C hook function is called without creating a Lua stack frame.
This of course means it's not visible in the stack trace. You
can't yield from a Lua hook function because the C hook function
set by debug.sethook() uses lua_call() (which is not resumable).
Note that you can lua_yield() from a pure C count/line hook
function (but not return to it) even in standard Lua.
Bye,
Mike