diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-02-13 15:25:20 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2014-02-13 15:25:20 -0200 |
commit | 90b0ac6495cb5b4f06b795bef3da346a55581284 (patch) | |
tree | b4e75b2323b29cdae4bec2af1d0b7a737ad687b0 /lapi.c | |
parent | de3b1c9b53d74de4f22fe75b801cc57e1ba2840e (diff) | |
download | lua-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.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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 | } |