aboutsummaryrefslogtreecommitdiff
path: root/ltests.c
diff options
context:
space:
mode:
Diffstat (limited to 'ltests.c')
-rw-r--r--ltests.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ltests.c b/ltests.c
index 04e8a00a..99456159 100644
--- a/ltests.c
+++ b/ltests.c
@@ -430,17 +430,17 @@ static void checkstack (global_State *g, lua_State *L1) {
430 UpVal *uv; 430 UpVal *uv;
431 lua_assert(!isdead(g, L1)); 431 lua_assert(!isdead(g, L1));
432 if (L1->stack == NULL) { /* incomplete thread? */ 432 if (L1->stack == NULL) { /* incomplete thread? */
433 lua_assert(L1->stacksize == 0 && L1->openupval == NULL && 433 lua_assert(L1->openupval == NULL && L1->ci == NULL);
434 L1->ci == NULL);
435 return; 434 return;
436 } 435 }
437 for (uv = L1->openupval; uv != NULL; uv = uv->u.open.next) 436 for (uv = L1->openupval; uv != NULL; uv = uv->u.open.next)
438 lua_assert(upisopen(uv)); /* must be open */ 437 lua_assert(upisopen(uv)); /* must be open */
438 lua_assert(L1->top <= L1->stack_last);
439 for (ci = L1->ci; ci != NULL; ci = ci->previous) { 439 for (ci = L1->ci; ci != NULL; ci = ci->previous) {
440 lua_assert(ci->top <= L1->stack_last); 440 lua_assert(ci->top <= L1->stack_last);
441 lua_assert(lua_checkpc(ci)); 441 lua_assert(lua_checkpc(ci));
442 } 442 }
443 for (o = L1->stack; o < L1->stack_last + EXTRA_STACK; o++) 443 for (o = L1->stack; o < L1->stack_last; o++)
444 checkliveness(L1, s2v(o)); /* entire stack must have valid values */ 444 checkliveness(L1, s2v(o)); /* entire stack must have valid values */
445} 445}
446 446
@@ -969,7 +969,7 @@ static int hash_query (lua_State *L) {
969static int stacklevel (lua_State *L) { 969static int stacklevel (lua_State *L) {
970 unsigned long a = 0; 970 unsigned long a = 0;
971 lua_pushinteger(L, (L->top - L->stack)); 971 lua_pushinteger(L, (L->top - L->stack));
972 lua_pushinteger(L, (L->stack_last - L->stack)); 972 lua_pushinteger(L, stacksize(L));
973 lua_pushinteger(L, L->nCcalls); 973 lua_pushinteger(L, L->nCcalls);
974 lua_pushinteger(L, L->nci); 974 lua_pushinteger(L, L->nci);
975 lua_pushinteger(L, (unsigned long)&a); 975 lua_pushinteger(L, (unsigned long)&a);