|
|
@ -1,5 +1,5 @@ |
|
|
|
/*
|
|
|
|
** $Id: lbaselib.c,v 1.170 2005/03/11 15:51:08 roberto Exp roberto $ |
|
|
|
** $Id: lbaselib.c,v 1.171 2005/03/16 16:58:41 roberto Exp roberto $ |
|
|
|
** Basic library |
|
|
|
** See Copyright Notice in lua.h |
|
|
|
*/ |
|
|
@ -187,9 +187,9 @@ static int luaB_gcinfo (lua_State *L) { |
|
|
|
|
|
|
|
static int luaB_collectgarbage (lua_State *L) { |
|
|
|
static const char *const opts[] = {"stop", "restart", "collect", |
|
|
|
"count", "step", "setpace", "setstepmul", NULL}; |
|
|
|
"count", "step", "setpause", "setstepmul", NULL}; |
|
|
|
static const int optsnum[] = {LUA_GCSTOP, LUA_GCRESTART, LUA_GCCOLLECT, |
|
|
|
LUA_GCCOUNT, LUA_GCSTEP, LUA_GCSETPACE, LUA_GCSETSTEPMUL}; |
|
|
|
LUA_GCCOUNT, LUA_GCSTEP, LUA_GCSETPAUSE, LUA_GCSETSTEPMUL}; |
|
|
|
int o = luaL_findstring(luaL_optstring(L, 1, "collect"), opts); |
|
|
|
int ex = luaL_optinteger(L, 2, 0); |
|
|
|
luaL_argcheck(L, o >= 0, 1, "invalid option"); |
|
|
|