diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2004-12-06 15:53:42 -0200 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2004-12-06 15:53:42 -0200 |
| commit | 39a8082f50c7321d75425f08a551a1d331dcea2d (patch) | |
| tree | 2a942d2647897371dc104b0271783f78cd0415f8 /lbaselib.c | |
| parent | 531874f6ce9f47f81294beeeba6cd0c15402411c (diff) | |
| download | lua-39a8082f50c7321d75425f08a551a1d331dcea2d.tar.gz lua-39a8082f50c7321d75425f08a551a1d331dcea2d.tar.bz2 lua-39a8082f50c7321d75425f08a551a1d331dcea2d.zip | |
more options for controling the GC
Diffstat (limited to '')
| -rw-r--r-- | lbaselib.c | 10 |
1 files changed, 5 insertions, 5 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lbaselib.c,v 1.159 2004/09/29 21:03:14 roberto Exp roberto $ | 2 | ** $Id: lbaselib.c,v 1.160 2004/11/18 19:53:49 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 | */ |
| @@ -181,10 +181,10 @@ static int luaB_gcinfo (lua_State *L) { | |||
| 181 | 181 | ||
| 182 | 182 | ||
| 183 | static int luaB_collectgarbage (lua_State *L) { | 183 | static int luaB_collectgarbage (lua_State *L) { |
| 184 | static const char *const opts[] = {"stop", "restart", "collect", "count", | 184 | static const char *const opts[] = {"stop", "restart", "collect", |
| 185 | "step", NULL}; | 185 | "count", "step", "setstepmul", "setincmode", NULL}; |
| 186 | static const int optsnum[] = {LUA_GCSTOP, LUA_GCRESTART, | 186 | static const int optsnum[] = {LUA_GCSTOP, LUA_GCRESTART, LUA_GCCOLLECT, |
| 187 | LUA_GCCOLLECT, LUA_GCCOUNT, LUA_GCSTEP}; | 187 | LUA_GCCOUNT, LUA_GCSTEP, LUA_GCSETSTEPMUL, LUA_GCSETINCMODE}; |
| 188 | int o = luaL_findstring(luaL_optstring(L, 1, "collect"), opts); | 188 | int o = luaL_findstring(luaL_optstring(L, 1, "collect"), opts); |
| 189 | int ex = luaL_optint(L, 2, 0); | 189 | int ex = luaL_optint(L, 2, 0); |
| 190 | luaL_argcheck(L, o >= 0, 1, "invalid option"); | 190 | luaL_argcheck(L, o >= 0, 1, "invalid option"); |
