lua-users home
lua-l archive

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


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.