commit 323f33d0148a385e98a15a2ad00c41d40c9f297b
parent 55dc7fb240d145b9e44380ab478e55c668a6797a
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date: Tue, 4 Aug 2009 15:19:54 -0300
'collectgarbage"count"' returns a second argument with the count%1024.
Diffstat:
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/lbaselib.c b/lbaselib.c
@@ -1,5 +1,5 @@
/*
-** $Id: lbaselib.c,v 1.216 2009/07/08 16:06:07 roberto Exp roberto $
+** $Id: lbaselib.c,v 1.217 2009/07/15 17:35:20 roberto Exp roberto $
** Basic library
** See Copyright Notice in lua.h
*/
@@ -194,7 +194,8 @@ static int luaB_collectgarbage (lua_State *L) {
case LUA_GCCOUNT: {
int b = lua_gc(L, LUA_GCCOUNTB, 0);
lua_pushnumber(L, res + ((lua_Number)b/1024));
- return 1;
+ lua_pushinteger(L, b);
+ return 2;
}
case LUA_GCSTEP: {
lua_pushboolean(L, res);