From 323f33d0148a385e98a15a2ad00c41d40c9f297b Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Tue, 4 Aug 2009 15:20:18 -0300 Subject: 'collectgarbage"count"' returns a second argument with the count%1024. --- lbaselib.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lbaselib.c') diff --git a/lbaselib.c b/lbaselib.c index 96e26a9a..edd72dcd 100644 --- 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); -- cgit v1.2.3-55-g6feb