aboutsummaryrefslogtreecommitdiff
path: root/ldo.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2000-11-24 15:39:56 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2000-11-24 15:39:56 -0200
commit96253ed8ceb38afa50887ccb5500442b5b220f08 (patch)
tree4b42b80f781b0cbe95782f8e8ebec06d85e80ae4 /ldo.c
parent35d6b1505702b0f4a2eee0e6d2f8dfc50943a1a7 (diff)
downloadlua-96253ed8ceb38afa50887ccb5500442b5b220f08.tar.gz
lua-96253ed8ceb38afa50887ccb5500442b5b220f08.tar.bz2
lua-96253ed8ceb38afa50887ccb5500442b5b220f08.zip
better support for 64-bit machines (avoid excessive use of longs)
Diffstat (limited to 'ldo.c')
-rw-r--r--ldo.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ldo.c b/ldo.c
index 0aedd8fb..140cff45 100644
--- a/ldo.c
+++ b/ldo.c
@@ -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
242static int protectedparser (lua_State *L, ZIO *z, int bin) { 242static 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 */