new GC state to sweep 'localgc' list + small changes in sweep control

This commit is contained in:
Roberto Ierusalimschy
2013-08-30 16:14:26 -03:00
parent 8ef9e8460e
commit 1bf4faec64
5 changed files with 48 additions and 46 deletions

View File

@@ -1,5 +1,5 @@
/*
** $Id: ltests.c,v 2.150 2013/08/27 18:53:35 roberto Exp roberto $
** $Id: ltests.c,v 2.151 2013/08/27 20:04:00 roberto Exp roberto $
** Internal Module for Debugging of the Lua Implementation
** See Copyright Notice in lua.h
*/
@@ -653,7 +653,8 @@ static int gc_local (lua_State *L) {
static int gc_state (lua_State *L) {
static const char *statenames[] = {"propagate", "atomic",
"sweepudata", "sweep", "pause", ""};
"sweeplocal", "sweepfin", "sweepall", "sweepmainth",
"pause", ""};
int option = luaL_checkoption(L, 1, "", statenames);
if (option == GCSpause + 1) {
lua_pushstring(L, statenames[G(L)->gcstate]);