aboutsummaryrefslogtreecommitdiff
path: root/lapi.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2004-12-06 15:53:42 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2004-12-06 15:53:42 -0200
commit39a8082f50c7321d75425f08a551a1d331dcea2d (patch)
tree2a942d2647897371dc104b0271783f78cd0415f8 /lapi.c
parent531874f6ce9f47f81294beeeba6cd0c15402411c (diff)
downloadlua-39a8082f50c7321d75425f08a551a1d331dcea2d.tar.gz
lua-39a8082f50c7321d75425f08a551a1d331dcea2d.tar.bz2
lua-39a8082f50c7321d75425f08a551a1d331dcea2d.zip
more options for controling the GC
Diffstat (limited to 'lapi.c')
-rw-r--r--lapi.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/lapi.c b/lapi.c
index a4cb91aa..9447f929 100644
--- a/lapi.c
+++ b/lapi.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lapi.c,v 2.20 2004/11/24 18:55:56 roberto Exp roberto $ 2** $Id: lapi.c,v 2.21 2004/12/03 20:50:25 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*/
@@ -867,6 +867,16 @@ LUA_API int lua_gc (lua_State *L, int what, int data) {
867 luaC_step(L); 867 luaC_step(L);
868 break; 868 break;
869 } 869 }
870 case LUA_GCSETSTEPMUL: {
871 res = g->stepmul;
872 g->stepmul = data;
873 break;
874 }
875 case LUA_GCSETINCMODE: {
876 res = g->incgc;
877 g->incgc = data;
878 break;
879 }
870 default: res = -1; /* invalid option */ 880 default: res = -1; /* invalid option */
871 } 881 }
872 lua_unlock(L); 882 lua_unlock(L);