summaryrefslogtreecommitdiff
path: root/lapi.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2017-02-23 18:07:34 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2017-02-23 18:07:34 -0300
commitf5f3df3bd17fb3489bbd26ab39fe1580a8dbf9c9 (patch)
tree84f67f71a728bc988661349c361f2a968b1d4910 /lapi.c
parente6c1e6005a9346d378e004a6d6e7fd98c7ee191b (diff)
downloadlua-f5f3df3bd17fb3489bbd26ab39fe1580a8dbf9c9.tar.gz
lua-f5f3df3bd17fb3489bbd26ab39fe1580a8dbf9c9.tar.bz2
lua-f5f3df3bd17fb3489bbd26ab39fe1580a8dbf9c9.zip
generational collection: new attempt (still incomplete)
Diffstat (limited to 'lapi.c')
-rw-r--r--lapi.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/lapi.c b/lapi.c
index 1c4d07dd..494fce75 100644
--- a/lapi.c
+++ b/lapi.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lapi.c,v 2.258 2016/01/05 16:07:21 roberto Exp roberto $ 2** $Id: lapi.c,v 2.259 2016/02/29 14:27:14 roberto Exp roberto $
3** Lua API 3** Lua API
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -1097,6 +1097,14 @@ LUA_API int lua_gc (lua_State *L, int what, int data) {
1097 res = g->gcrunning; 1097 res = g->gcrunning;
1098 break; 1098 break;
1099 } 1099 }
1100 case LUA_GCGEN: {
1101 luaC_changemode(L, KGC_GEN);
1102 break;
1103 }
1104 case LUA_GCINC: {
1105 luaC_changemode(L, KGC_NORMAL);
1106 break;
1107 }
1100 default: res = -1; /* invalid option */ 1108 default: res = -1; /* invalid option */
1101 } 1109 }
1102 lua_unlock(L); 1110 lua_unlock(L);