diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-02-14 11:19:44 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-02-14 11:19:44 -0200 |
commit | a9af455b329fa49e7481068094a6a6b4551ccbef (patch) | |
tree | d16fe4500fa11cc19fc31e0845ef65791f14502b | |
parent | 678d2fb2ace2dbdf91fdac2752e1f4dfe73651df (diff) | |
download | lua-a9af455b329fa49e7481068094a6a6b4551ccbef.tar.gz lua-a9af455b329fa49e7481068094a6a6b4551ccbef.tar.bz2 lua-a9af455b329fa49e7481068094a6a6b4551ccbef.zip |
detail
-rw-r--r-- | lbaselib.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lbaselib.c,v 1.164 2005/01/07 19:53:32 roberto Exp roberto $ | 2 | ** $Id: lbaselib.c,v 1.165 2005/01/14 14:19:42 roberto Exp roberto $ |
3 | ** Basic library | 3 | ** Basic library |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -186,9 +186,9 @@ static int luaB_collectgarbage (lua_State *L) { | |||
186 | static const int optsnum[] = {LUA_GCSTOP, LUA_GCRESTART, LUA_GCCOLLECT, | 186 | static const int optsnum[] = {LUA_GCSTOP, LUA_GCRESTART, LUA_GCCOLLECT, |
187 | LUA_GCCOUNT, LUA_GCSTEP, LUA_GCSETPACE, LUA_GCSETSTEPMUL}; | 187 | LUA_GCCOUNT, LUA_GCSTEP, LUA_GCSETPACE, LUA_GCSETSTEPMUL}; |
188 | int o = luaL_findstring(luaL_optstring(L, 1, "collect"), opts); | 188 | int o = luaL_findstring(luaL_optstring(L, 1, "collect"), opts); |
189 | lua_Number ex = luaL_optnumber(L, 2, 0); | 189 | int ex = luaL_optinteger(L, 2, 0); |
190 | luaL_argcheck(L, o >= 0, 1, "invalid option"); | 190 | luaL_argcheck(L, o >= 0, 1, "invalid option"); |
191 | lua_pushinteger(L, lua_gc(L, optsnum[o], ex * 100)); | 191 | lua_pushinteger(L, lua_gc(L, optsnum[o], ex)); |
192 | return 1; | 192 | return 1; |
193 | } | 193 | } |
194 | 194 | ||