Bug: Call hook may be called twice when count hook yields

Took the opportunity and moved the code that controls call hooks
in 'luaV_execute' into a function.
This commit is contained in:
Roberto Ierusalimschy
2023-07-25 16:50:44 -03:00
parent 6b51133a98
commit 1b3f507f62
4 changed files with 27 additions and 11 deletions

View File

@@ -181,7 +181,7 @@ struct CallInfo {
union {
struct { /* only for Lua functions */
const Instruction *savedpc;
volatile l_signalT trap;
volatile l_signalT trap; /* function is tracing lines/counts */
int nextraargs; /* # of extra arguments in vararg functions */
} l;
struct { /* only for C functions */