[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: 5.1alpha count and line hook
- From: Jan Kratochvíl <jan.kratochvil@...>
- Date: Thu, 27 Oct 2005 16:35:32 +0200
Hello,
i experienced strange behaviour with lua 5.1 alpha using count hooks
and line hooks together. Sometimes i didn't get the line
hook so i traced it inside lua and i found that in traceexec is this
<quote:line 65>
if (mask > LUA_MASKLINE) { /* instruction-hook set? */
if (L->hookcount == 0) {
resethookcount(L);
luaD_callhook(L, LUA_HOOKCOUNT, -1);
return;
}
}
if (mask & LUA_MASKLINE) {
</quote>
As you can see i got count hook but i can't got line hook because of
return on line 69.
Removing this return fixed my problem. But is it safe to do? (i don't
understand lua internals so
i don't know if luaD_callhook can be called twice in traceexec, so i am
rather asking :) )
Thanks
Jan Kratochvil
Illusion softworks, a.s.