diff options
Diffstat (limited to 'ldebug.c')
-rw-r--r-- | ldebug.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -182,7 +182,7 @@ static const char *upvalname (const Proto *p, int uv) { | |||
182 | 182 | ||
183 | 183 | ||
184 | static const char *findvararg (CallInfo *ci, int n, StkId *pos) { | 184 | static const char *findvararg (CallInfo *ci, int n, StkId *pos) { |
185 | if (clLvalue(s2v(ci->func.p))->p->is_vararg) { | 185 | if (clLvalue(s2v(ci->func.p))->p->flag & PF_ISVARARG) { |
186 | int nextra = ci->u.l.nextraargs; | 186 | int nextra = ci->u.l.nextraargs; |
187 | if (n >= -nextra) { /* 'n' is negative */ | 187 | if (n >= -nextra) { /* 'n' is negative */ |
188 | *pos = ci->func.p - nextra - (n + 1); | 188 | *pos = ci->func.p - nextra - (n + 1); |
@@ -301,7 +301,7 @@ static void collectvalidlines (lua_State *L, Closure *f) { | |||
301 | sethvalue2s(L, L->top.p, t); /* push it on stack */ | 301 | sethvalue2s(L, L->top.p, t); /* push it on stack */ |
302 | api_incr_top(L); | 302 | api_incr_top(L); |
303 | setbtvalue(&v); /* boolean 'true' to be the value of all indices */ | 303 | setbtvalue(&v); /* boolean 'true' to be the value of all indices */ |
304 | if (!p->is_vararg) /* regular function? */ | 304 | if (!(p->flag & PF_ISVARARG)) /* regular function? */ |
305 | i = 0; /* consider all instructions */ | 305 | i = 0; /* consider all instructions */ |
306 | else { /* vararg function */ | 306 | else { /* vararg function */ |
307 | lua_assert(GET_OPCODE(p->code[0]) == OP_VARARGPREP); | 307 | lua_assert(GET_OPCODE(p->code[0]) == OP_VARARGPREP); |
@@ -344,7 +344,7 @@ static int auxgetinfo (lua_State *L, const char *what, lua_Debug *ar, | |||
344 | ar->nparams = 0; | 344 | ar->nparams = 0; |
345 | } | 345 | } |
346 | else { | 346 | else { |
347 | ar->isvararg = f->l.p->is_vararg; | 347 | ar->isvararg = f->l.p->flag & PF_ISVARARG; |
348 | ar->nparams = f->l.p->numparams; | 348 | ar->nparams = f->l.p->numparams; |
349 | } | 349 | } |
350 | break; | 350 | break; |
@@ -878,7 +878,7 @@ int luaG_tracecall (lua_State *L) { | |||
878 | Proto *p = ci_func(ci)->p; | 878 | Proto *p = ci_func(ci)->p; |
879 | ci->u.l.trap = 1; /* ensure hooks will be checked */ | 879 | ci->u.l.trap = 1; /* ensure hooks will be checked */ |
880 | if (ci->u.l.savedpc == p->code) { /* first instruction (not resuming)? */ | 880 | if (ci->u.l.savedpc == p->code) { /* first instruction (not resuming)? */ |
881 | if (p->is_vararg) | 881 | if (p->flag & PF_ISVARARG) |
882 | return 0; /* hooks will start at VARARGPREP instruction */ | 882 | return 0; /* hooks will start at VARARGPREP instruction */ |
883 | else if (!(ci->callstatus & CIST_HOOKYIELD)) /* not yieded? */ | 883 | else if (!(ci->callstatus & CIST_HOOKYIELD)) /* not yieded? */ |
884 | luaD_hookcall(L, ci); /* check 'call' hook */ | 884 | luaD_hookcall(L, ci); /* check 'call' hook */ |