diff options
Diffstat (limited to 'ltests.c')
-rw-r--r-- | ltests.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ltests.c,v 2.221 2017/06/27 11:35:31 roberto Exp roberto $ | 2 | ** $Id: ltests.c,v 2.222 2017/06/27 18:32:49 roberto Exp roberto $ |
3 | ** Internal Module for Debugging of the Lua Implementation | 3 | ** Internal Module for Debugging of the Lua Implementation |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -46,7 +46,7 @@ void *l_Trick = 0; | |||
46 | int islocked = 0; | 46 | int islocked = 0; |
47 | 47 | ||
48 | 48 | ||
49 | #define obj_at(L,k) (L->ci->func + (k)) | 49 | #define obj_at(L,k) s2v(L->ci->func + (k)) |
50 | 50 | ||
51 | 51 | ||
52 | static int runC (lua_State *L, lua_State *L1, const char *pc); | 52 | static int runC (lua_State *L, lua_State *L1, const char *pc); |
@@ -316,7 +316,7 @@ static int lua_checkpc (lua_State *L, CallInfo *ci) { | |||
316 | StkId f = (L->status != LUA_YIELD || ci != L->ci) | 316 | StkId f = (L->status != LUA_YIELD || ci != L->ci) |
317 | ? ci->func | 317 | ? ci->func |
318 | : restorestack(L, ci->extra); | 318 | : restorestack(L, ci->extra); |
319 | Proto *p = clLvalue(f)->p; | 319 | Proto *p = clLvalue(s2v(f))->p; |
320 | return p->code <= ci->u.l.savedpc && | 320 | return p->code <= ci->u.l.savedpc && |
321 | ci->u.l.savedpc <= p->code + p->sizecode; | 321 | ci->u.l.savedpc <= p->code + p->sizecode; |
322 | } | 322 | } |
@@ -336,7 +336,7 @@ static void checkstack (global_State *g, lua_State *L1) { | |||
336 | } | 336 | } |
337 | if (L1->stack) { /* complete thread? */ | 337 | if (L1->stack) { /* complete thread? */ |
338 | for (o = L1->stack; o < L1->stack_last + EXTRA_STACK; o++) | 338 | for (o = L1->stack; o < L1->stack_last + EXTRA_STACK; o++) |
339 | checkliveness(L1, o); /* entire stack must have valid values */ | 339 | checkliveness(L1, s2v(o)); /* entire stack must have valid values */ |
340 | } | 340 | } |
341 | else lua_assert(L1->stacksize == 0); | 341 | else lua_assert(L1->stacksize == 0); |
342 | } | 342 | } |