From 5be517602e5334573297fe8d421a92eb0184ce86 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Fri, 14 Jan 2005 12:19:42 -0200 Subject: no more generational collector (and no more `noinc' mode) --- lbaselib.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'lbaselib.c') diff --git a/lbaselib.c b/lbaselib.c index 042556b9..1d7004b1 100644 --- a/lbaselib.c +++ b/lbaselib.c @@ -1,5 +1,5 @@ /* -** $Id: lbaselib.c,v 1.163 2004/12/13 12:15:11 roberto Exp roberto $ +** $Id: lbaselib.c,v 1.164 2005/01/07 19:53:32 roberto Exp roberto $ ** Basic library ** See Copyright Notice in lua.h */ @@ -182,13 +182,13 @@ 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", "setincmode", NULL}; + "count", "step", "setpace", "setstepmul", NULL}; static const int optsnum[] = {LUA_GCSTOP, LUA_GCRESTART, LUA_GCCOLLECT, - LUA_GCCOUNT, LUA_GCSTEP, LUA_GCSETPACE, LUA_GCSETINCMODE}; + LUA_GCCOUNT, LUA_GCSTEP, LUA_GCSETPACE, LUA_GCSETSTEPMUL}; int o = luaL_findstring(luaL_optstring(L, 1, "collect"), opts); - int ex = luaL_optint(L, 2, 0); + lua_Number ex = luaL_optnumber(L, 2, 0); luaL_argcheck(L, o >= 0, 1, "invalid option"); - lua_pushinteger(L, lua_gc(L, optsnum[o], ex)); + lua_pushinteger(L, lua_gc(L, optsnum[o], ex * 100)); return 1; } @@ -620,9 +620,6 @@ static void base_open (lua_State *L) { /* create register._LOADED to track loaded modules */ lua_newtable(L); lua_setfield(L, LUA_REGISTRYINDEX, "_LOADED"); - /* create register._PRELOAD to allow pre-loaded modules */ - lua_newtable(L); - lua_setfield(L, LUA_REGISTRYINDEX, "_PRELOAD"); /* set global _G */ lua_pushvalue(L, LUA_GLOBALSINDEX); lua_setglobal(L, "_G"); -- cgit v1.2.3-55-g6feb