|
@@ -198,11 +198,9 @@ static int pushmode (lua_State *L, int oldmode) {
|
|
|
|
|
|
static int luaB_collectgarbage (lua_State *L) {
|
|
static int luaB_collectgarbage (lua_State *L) {
|
|
static const char *const opts[] = {"stop", "restart", "collect",
|
|
static const char *const opts[] = {"stop", "restart", "collect",
|
|
- "count", "step", "setpause", "setstepmul",
|
|
|
|
- "isrunning", "generational", "incremental", NULL};
|
|
|
|
|
|
+ "count", "step", "isrunning", "generational", "incremental", NULL};
|
|
static const int optsnum[] = {LUA_GCSTOP, LUA_GCRESTART, LUA_GCCOLLECT,
|
|
static const int optsnum[] = {LUA_GCSTOP, LUA_GCRESTART, LUA_GCCOLLECT,
|
|
- LUA_GCCOUNT, LUA_GCSTEP, LUA_GCSETPAUSE, LUA_GCSETSTEPMUL,
|
|
|
|
- LUA_GCISRUNNING, LUA_GCGEN, LUA_GCINC};
|
|
|
|
|
|
+ LUA_GCCOUNT, LUA_GCSTEP, LUA_GCISRUNNING, LUA_GCGEN, LUA_GCINC};
|
|
int o = optsnum[luaL_checkoption(L, 1, "collect", opts)];
|
|
int o = optsnum[luaL_checkoption(L, 1, "collect", opts)];
|
|
switch (o) {
|
|
switch (o) {
|
|
case LUA_GCCOUNT: {
|
|
case LUA_GCCOUNT: {
|
|
@@ -219,14 +217,6 @@ static int luaB_collectgarbage (lua_State *L) {
|
|
lua_pushboolean(L, res);
|
|
lua_pushboolean(L, res);
|
|
return 1;
|
|
return 1;
|
|
}
|
|
}
|
|
- case LUA_GCSETPAUSE:
|
|
|
|
- case LUA_GCSETSTEPMUL: {
|
|
|
|
- int p = (int)luaL_optinteger(L, 2, 0);
|
|
|
|
- int previous = lua_gc(L, o, p);
|
|
|
|
- checkvalres(previous);
|
|
|
|
- lua_pushinteger(L, previous);
|
|
|
|
- return 1;
|
|
|
|
- }
|
|
|
|
case LUA_GCISRUNNING: {
|
|
case LUA_GCISRUNNING: {
|
|
int res = lua_gc(L, o);
|
|
int res = lua_gc(L, o);
|
|
checkvalres(res);
|
|
checkvalres(res);
|