diff options
Diffstat (limited to 'lbaselib.c')
-rw-r--r-- | lbaselib.c | 14 |
1 files changed, 2 insertions, 12 deletions
@@ -198,11 +198,9 @@ static int pushmode (lua_State *L, int oldmode) { | |||
198 | 198 | ||
199 | static int luaB_collectgarbage (lua_State *L) { | 199 | static int luaB_collectgarbage (lua_State *L) { |
200 | static const char *const opts[] = {"stop", "restart", "collect", | 200 | static const char *const opts[] = {"stop", "restart", "collect", |
201 | "count", "step", "setpause", "setstepmul", | 201 | "count", "step", "isrunning", "generational", "incremental", NULL}; |
202 | "isrunning", "generational", "incremental", NULL}; | ||
203 | static const int optsnum[] = {LUA_GCSTOP, LUA_GCRESTART, LUA_GCCOLLECT, | 202 | static const int optsnum[] = {LUA_GCSTOP, LUA_GCRESTART, LUA_GCCOLLECT, |
204 | LUA_GCCOUNT, LUA_GCSTEP, LUA_GCSETPAUSE, LUA_GCSETSTEPMUL, | 203 | LUA_GCCOUNT, LUA_GCSTEP, LUA_GCISRUNNING, LUA_GCGEN, LUA_GCINC}; |
205 | LUA_GCISRUNNING, LUA_GCGEN, LUA_GCINC}; | ||
206 | int o = optsnum[luaL_checkoption(L, 1, "collect", opts)]; | 204 | int o = optsnum[luaL_checkoption(L, 1, "collect", opts)]; |
207 | switch (o) { | 205 | switch (o) { |
208 | case LUA_GCCOUNT: { | 206 | case LUA_GCCOUNT: { |
@@ -219,14 +217,6 @@ static int luaB_collectgarbage (lua_State *L) { | |||
219 | lua_pushboolean(L, res); | 217 | lua_pushboolean(L, res); |
220 | return 1; | 218 | return 1; |
221 | } | 219 | } |
222 | case LUA_GCSETPAUSE: | ||
223 | case LUA_GCSETSTEPMUL: { | ||
224 | int p = (int)luaL_optinteger(L, 2, 0); | ||
225 | int previous = lua_gc(L, o, p); | ||
226 | checkvalres(previous); | ||
227 | lua_pushinteger(L, previous); | ||
228 | return 1; | ||
229 | } | ||
230 | case LUA_GCISRUNNING: { | 220 | case LUA_GCISRUNNING: { |
231 | int res = lua_gc(L, o); | 221 | int res = lua_gc(L, o); |
232 | checkvalres(res); | 222 | checkvalres(res); |