[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Why isn't Lua 5.2's debug hook function called with lua_callk()?
- From: Roberto Ierusalimschy <roberto@...>
- Date: Tue, 17 Jan 2012 17:04:21 -0200
> I was using Lua 5.1 + LuaCoco to yield from a debug hook function
> and that was working fine. I was hoping that Lua 5.2, which
> incorporates some of LuaCoco's functionality, would allow this
> natively but looking at the code in ldblib.c:271 (in hookf) shows
> lua_call() being used instead of lua_callk(). Therefore I am getting
> the 'attemp to yield across C-call boundary' errors. Is there a
> reason for not using lua_callk()?
Yes. In Lua 5.2 you still cannot yield across some boundaries, and that
include hooks.
-- Roberto