diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2013-09-13 13:21:52 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2013-09-13 13:21:52 -0300 |
commit | 686e57cf9c61070ff961407e3304071e171542f4 (patch) | |
tree | 902f64eb6a46bcd57d4d1140efd5bdcf7f1e501f /lbaselib.c | |
parent | 06156e7575dee21026595a30dcf76f400c447a33 (diff) | |
download | lua-686e57cf9c61070ff961407e3304071e171542f4.tar.gz lua-686e57cf9c61070ff961407e3304071e171542f4.tar.bz2 lua-686e57cf9c61070ff961407e3304071e171542f4.zip |
GC local pause configurable
Diffstat (limited to 'lbaselib.c')
-rw-r--r-- | lbaselib.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lbaselib.c,v 1.280 2013/07/10 17:15:12 roberto Exp roberto $ | 2 | ** $Id: lbaselib.c,v 1.281 2013/08/05 16:58:28 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 | */ |
@@ -174,9 +174,11 @@ static int luaB_rawset (lua_State *L) { | |||
174 | 174 | ||
175 | static int luaB_collectgarbage (lua_State *L) { | 175 | static int luaB_collectgarbage (lua_State *L) { |
176 | static const char *const opts[] = {"stop", "restart", "collect", | 176 | static const char *const opts[] = {"stop", "restart", "collect", |
177 | "count", "step", "setpause", "setstepmul", "isrunning", NULL}; | 177 | "count", "step", "setpause", "setstepmul", |
178 | "setlocalpause", "isrunning", NULL}; | ||
178 | static const int optsnum[] = {LUA_GCSTOP, LUA_GCRESTART, LUA_GCCOLLECT, | 179 | static const int optsnum[] = {LUA_GCSTOP, LUA_GCRESTART, LUA_GCCOLLECT, |
179 | LUA_GCCOUNT, LUA_GCSTEP, LUA_GCSETPAUSE, LUA_GCSETSTEPMUL, LUA_GCISRUNNING}; | 180 | LUA_GCCOUNT, LUA_GCSTEP, LUA_GCSETPAUSE, LUA_GCSETSTEPMUL, |
181 | LUA_GCSETLOCALPAUSE, LUA_GCISRUNNING}; | ||
180 | int o = optsnum[luaL_checkoption(L, 1, "collect", opts)]; | 182 | int o = optsnum[luaL_checkoption(L, 1, "collect", opts)]; |
181 | int ex = luaL_optint(L, 2, 0); | 183 | int ex = luaL_optint(L, 2, 0); |
182 | int res = lua_gc(L, o, ex); | 184 | int res = lua_gc(L, o, ex); |