aboutsummaryrefslogtreecommitdiff
path: root/lstate.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>1999-12-07 09:42:54 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>1999-12-07 09:42:54 -0200
commit9c142740c107fef2ff7f8ea8554222a2114f2a38 (patch)
tree83750dbf042588f4ae399b2b053a825888c74341 /lstate.c
parent7621cc2aa5197cc2677559e716282c331c8e0b65 (diff)
downloadlua-9c142740c107fef2ff7f8ea8554222a2114f2a38.tar.gz
lua-9c142740c107fef2ff7f8ea8554222a2114f2a38.tar.bz2
lua-9c142740c107fef2ff7f8ea8554222a2114f2a38.zip
stack may not be empty after a correct run...
Diffstat (limited to 'lstate.c')
-rw-r--r--lstate.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/lstate.c b/lstate.c
index 04e7d419..37b6f2a3 100644
--- a/lstate.c
+++ b/lstate.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lstate.c,v 1.20 1999/12/06 11:41:28 roberto Exp roberto $ 2** $Id: lstate.c,v 1.21 1999/12/06 12:03:45 roberto Exp roberto $
3** Global State 3** Global State
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -101,12 +101,12 @@ void lua_close (lua_State *L) {
101 luaM_free(L, L->Cblocks); 101 luaM_free(L, L->Cblocks);
102 LUA_ASSERT(L, L->numCblocks == 0, "Cblocks still open"); 102 LUA_ASSERT(L, L->numCblocks == 0, "Cblocks still open");
103 LUA_ASSERT(L, L->nblocks == 0, "wrong count for nblocks"); 103 LUA_ASSERT(L, L->nblocks == 0, "wrong count for nblocks");
104 LUA_ASSERT(L, L != lua_state || L->Cstack.lua2C == L->stack, "bad stack"); 104 LUA_ASSERT(L, L->Cstack.base == L->top, "C2Lua not empty");
105 LUA_ASSERT(L, L != lua_state || L->Cstack.base == L->stack, "bad stack");
106 luaM_free(L, L); 105 luaM_free(L, L);
107 LUA_ASSERT(L, L != lua_state || numblocks == 0, "memory leak!"); 106 if (L == lua_state) {
108 LUA_ASSERT(L, L != lua_state || totalmem == 0,"memory leak!"); 107 LUA_ASSERT(L, numblocks == 0, "memory leak!");
109 if (L == lua_state) 108 LUA_ASSERT(L, totalmem == 0,"memory leak!");
110 lua_state = NULL; 109 lua_state = NULL;
110 }
111} 111}
112 112