diff options
Diffstat (limited to 'ldo.c')
-rw-r--r-- | ldo.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ldo.c,v 1.108 2000/10/20 16:39:03 roberto Exp roberto $ | 2 | ** $Id: ldo.c,v 1.109 2000/10/30 12:38:50 roberto Exp roberto $ |
3 | ** Stack and Call structure of Lua | 3 | ** Stack and Call structure of Lua |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -241,7 +241,7 @@ static void f_parser (lua_State *L, void *ud) { | |||
241 | 241 | ||
242 | static int protectedparser (lua_State *L, ZIO *z, int bin) { | 242 | static int protectedparser (lua_State *L, ZIO *z, int bin) { |
243 | struct ParserS p; | 243 | struct ParserS p; |
244 | unsigned long old_blocks; | 244 | mem_int old_blocks; |
245 | int status; | 245 | int status; |
246 | p.z = z; p.bin = bin; | 246 | p.z = z; p.bin = bin; |
247 | luaC_checkGC(L); | 247 | luaC_checkGC(L); |
@@ -249,6 +249,7 @@ static int protectedparser (lua_State *L, ZIO *z, int bin) { | |||
249 | status = luaD_runprotected(L, f_parser, &p); | 249 | status = luaD_runprotected(L, f_parser, &p); |
250 | if (status == 0) { | 250 | if (status == 0) { |
251 | /* add new memory to threshold (as it probably will stay) */ | 251 | /* add new memory to threshold (as it probably will stay) */ |
252 | LUA_ASSERT(L->nblocks >= old_blocks, "cannot reduce memory usage here"); | ||
252 | L->GCthreshold += (L->nblocks - old_blocks); | 253 | L->GCthreshold += (L->nblocks - old_blocks); |
253 | } | 254 | } |
254 | else if (status == LUA_ERRRUN) /* an error occurred: correct error code */ | 255 | else if (status == LUA_ERRRUN) /* an error occurred: correct error code */ |