diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1999-12-07 09:42:54 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1999-12-07 09:42:54 -0200 |
commit | 9c142740c107fef2ff7f8ea8554222a2114f2a38 (patch) | |
tree | 83750dbf042588f4ae399b2b053a825888c74341 /lstate.c | |
parent | 7621cc2aa5197cc2677559e716282c331c8e0b65 (diff) | |
download | lua-github-9c142740c107fef2ff7f8ea8554222a2114f2a38.tar.gz |
stack may not be empty after a correct run...
Diffstat (limited to 'lstate.c')
-rw-r--r-- | lstate.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -1,5 +1,5 @@ /* -** $Id: lstate.c,v 1.20 1999/12/06 11:41:28 roberto Exp roberto $ +** $Id: lstate.c,v 1.21 1999/12/06 12:03:45 roberto Exp roberto $ ** Global State ** See Copyright Notice in lua.h */ @@ -101,12 +101,12 @@ void lua_close (lua_State *L) { luaM_free(L, L->Cblocks); LUA_ASSERT(L, L->numCblocks == 0, "Cblocks still open"); LUA_ASSERT(L, L->nblocks == 0, "wrong count for nblocks"); - LUA_ASSERT(L, L != lua_state || L->Cstack.lua2C == L->stack, "bad stack"); - LUA_ASSERT(L, L != lua_state || L->Cstack.base == L->stack, "bad stack"); + LUA_ASSERT(L, L->Cstack.base == L->top, "C2Lua not empty"); luaM_free(L, L); - LUA_ASSERT(L, L != lua_state || numblocks == 0, "memory leak!"); - LUA_ASSERT(L, L != lua_state || totalmem == 0,"memory leak!"); - if (L == lua_state) + if (L == lua_state) { + LUA_ASSERT(L, numblocks == 0, "memory leak!"); + LUA_ASSERT(L, totalmem == 0,"memory leak!"); lua_state = NULL; + } } |