lua-users home
lua-l archive

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


On Thu, 21 Jun 2007 21:32:32 +0200
Arithmeth <arithmeth@gmail.com> wrote:

> I've read I can only do it safely by calling lua_sethook(). In
> particular I am using LUA_MASKLINE as mask for the hook.
you are perfectly right. see
http://www.tecgraf.puc-rio.br/~lhf/ftp/lua/5.0/lalarm.tar.gz
the authors of Lua did it this way too. %-) 

> 1st Question) If first() is in the middle of a C call i can't stop it,
> right?
you can do luaL_error(...), see `lua.c' and check this in your main
loop where you did lua_pcall(...). it will do the job.