diff options
Diffstat (limited to 'ldo.c')
-rw-r--r-- | ldo.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ldo.c,v 1.74 2000/05/08 19:32:53 roberto Exp roberto $ | 2 | ** $Id: ldo.c,v 1.75 2000/05/09 14:50:16 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 | */ |
@@ -311,7 +311,9 @@ static int do_main (lua_State *L, ZIO *z, int bin) { | |||
311 | int status; | 311 | int status; |
312 | int debug = L->debug; /* save debug status */ | 312 | int debug = L->debug; /* save debug status */ |
313 | do { | 313 | do { |
314 | long old_blocks = (luaC_checkGC(L), L->nblocks); | 314 | unsigned long old_blocks; |
315 | luaC_checkGC(L); | ||
316 | old_blocks = L->nblocks; | ||
315 | status = protectedparser(L, z, bin); | 317 | status = protectedparser(L, z, bin); |
316 | if (status == 1) return 1; /* error */ | 318 | if (status == 1) return 1; /* error */ |
317 | else if (status == 2) return 0; /* `natural' end */ | 319 | else if (status == 2) return 0; /* `natural' end */ |
@@ -358,7 +360,8 @@ int lua_dostring (lua_State *L, const char *str) { | |||
358 | } | 360 | } |
359 | 361 | ||
360 | 362 | ||
361 | int lua_dobuffer (lua_State *L, const char *buff, int size, const char *name) { | 363 | int lua_dobuffer (lua_State *L, const char *buff, size_t size, |
364 | const char *name) { | ||
362 | ZIO z; | 365 | ZIO z; |
363 | if (!name) name = "?"; | 366 | if (!name) name = "?"; |
364 | luaZ_mopen(&z, buff, size, name); | 367 | luaZ_mopen(&z, buff, size, name); |