aboutsummaryrefslogtreecommitdiff
path: root/lapi.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2010-05-05 15:53:41 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2010-05-05 15:53:41 -0300
commitd77898597ef659907d6698cae319c8be13fcdcde (patch)
treef7d227c27d264e6bccdfa010aafa965e8344e54e /lapi.c
parent237f755dca9a4fd105ec0c1b0b402c7923daceba (diff)
downloadlua-d77898597ef659907d6698cae319c8be13fcdcde.tar.gz
lua-d77898597ef659907d6698cae319c8be13fcdcde.tar.bz2
lua-d77898597ef659907d6698cae319c8be13fcdcde.zip
new function 'luaC_changemode'
Diffstat (limited to 'lapi.c')
-rw-r--r--lapi.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/lapi.c b/lapi.c
index 766878d7..d3c01e27 100644
--- a/lapi.c
+++ b/lapi.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lapi.c,v 2.124 2010/04/20 20:14:50 roberto Exp roberto $ 2** $Id: lapi.c,v 2.125 2010/04/29 17:31:31 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*/
@@ -69,7 +69,7 @@ static TValue *index2addr (lua_State *L, int idx) {
69 69
70 70
71/* 71/*
72** to be caled by 'lua_checkstack' in protected mode, to grow stack 72** to be called by 'lua_checkstack' in protected mode, to grow stack
73** capturing memory errors 73** capturing memory errors
74*/ 74*/
75static void growstack (lua_State *L, void *ud) { 75static void growstack (lua_State *L, void *ud) {
@@ -966,14 +966,9 @@ LUA_API int lua_gc (lua_State *L, int what, int data) {
966 res = !gcstopped(g); 966 res = !gcstopped(g);
967 break; 967 break;
968 } 968 }
969 case LUA_GCGEN: { /* change collector to generational mode */ 969 case LUA_GCGEN: /* change collector to generational mode */
970 luaC_runtilstate(L, bitmask(GCSpropagate));
971 g->lastmajormem = g->totalbytes;
972 g->gckind = KGC_GEN;
973 break;
974 }
975 case LUA_GCINC: { /* change collector to incremental mode */ 970 case LUA_GCINC: { /* change collector to incremental mode */
976 g->gckind = KGC_NORMAL; 971 luaC_changemode(L, what);
977 break; 972 break;
978 } 973 }
979 default: res = -1; /* invalid option */ 974 default: res = -1; /* invalid option */