diff options
Diffstat (limited to 'lbaselib.c')
-rw-r--r-- | lbaselib.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lbaselib.c,v 1.239 2010/03/22 18:28:03 roberto Exp roberto $ | 2 | ** $Id: lbaselib.c,v 1.240 2010/03/26 20:58:11 roberto Exp roberto $ |
3 | ** Basic library | 3 | ** Basic library |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -148,10 +148,11 @@ static int luaB_gcinfo (lua_State *L) { | |||
148 | 148 | ||
149 | static int luaB_collectgarbage (lua_State *L) { | 149 | static int luaB_collectgarbage (lua_State *L) { |
150 | static const char *const opts[] = {"stop", "restart", "collect", | 150 | static const char *const opts[] = {"stop", "restart", "collect", |
151 | "count", "step", "setpause", "setstepmul", "isrunning", "gen", NULL}; | 151 | "count", "step", "setpause", "setstepmul", "isrunning", |
152 | "gen", "inc", NULL}; | ||
152 | static const int optsnum[] = {LUA_GCSTOP, LUA_GCRESTART, LUA_GCCOLLECT, | 153 | static const int optsnum[] = {LUA_GCSTOP, LUA_GCRESTART, LUA_GCCOLLECT, |
153 | LUA_GCCOUNT, LUA_GCSTEP, LUA_GCSETPAUSE, LUA_GCSETSTEPMUL, | 154 | LUA_GCCOUNT, LUA_GCSTEP, LUA_GCSETPAUSE, LUA_GCSETSTEPMUL, |
154 | LUA_GCISRUNNING, LUA_GCGEN}; | 155 | LUA_GCISRUNNING, LUA_GCGEN, LUA_GCINC}; |
155 | int o = optsnum[luaL_checkoption(L, 1, "collect", opts)]; | 156 | int o = optsnum[luaL_checkoption(L, 1, "collect", opts)]; |
156 | int ex = luaL_optint(L, 2, 0); | 157 | int ex = luaL_optint(L, 2, 0); |
157 | int res = lua_gc(L, o, ex); | 158 | int res = lua_gc(L, o, ex); |