aboutsummaryrefslogtreecommitdiff
path: root/lapi.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2014-02-13 15:25:20 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2014-02-13 15:25:20 -0200
commit90b0ac6495cb5b4f06b795bef3da346a55581284 (patch)
treeb4e75b2323b29cdae4bec2af1d0b7a737ad687b0 /lapi.c
parentde3b1c9b53d74de4f22fe75b801cc57e1ba2840e (diff)
downloadlua-90b0ac6495cb5b4f06b795bef3da346a55581284.tar.gz
lua-90b0ac6495cb5b4f06b795bef3da346a55581284.tar.bz2
lua-90b0ac6495cb5b4f06b795bef3da346a55581284.zip
limit to 'gcstepmul' imposed by 'lua_gc' (+ some details in 'lgc.c')
Diffstat (limited to 'lapi.c')
-rw-r--r--lapi.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lapi.c b/lapi.c
index 0fcb6eaa..d5765cc9 100644
--- a/lapi.c
+++ b/lapi.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lapi.c,v 2.193 2014/01/27 13:34:32 roberto Exp roberto $ 2** $Id: lapi.c,v 2.194 2014/02/13 12:11:34 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*/
@@ -1086,6 +1086,7 @@ LUA_API int lua_gc (lua_State *L, int what, int data) {
1086 } 1086 }
1087 case LUA_GCSETSTEPMUL: { 1087 case LUA_GCSETSTEPMUL: {
1088 res = g->gcstepmul; 1088 res = g->gcstepmul;
1089 if (data < 40) data = 40; /* avoid ridiculous low values (and 0) */
1089 g->gcstepmul = data; 1090 g->gcstepmul = data;
1090 break; 1091 break;
1091 } 1092 }