diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2004-08-12 14:02:51 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2004-08-12 14:02:51 -0300 |
commit | a7c74c06b9fa05c06710ff3db1f22f68b20acbe9 (patch) | |
tree | dd154d534b640f4c1b7741e303dc5d9cedc01646 /lapi.c | |
parent | c7dda42c2f5a7aec34c0970164a55d4038daf7ec (diff) | |
download | lua-a7c74c06b9fa05c06710ff3db1f22f68b20acbe9.tar.gz lua-a7c74c06b9fa05c06710ff3db1f22f68b20acbe9.tar.bz2 lua-a7c74c06b9fa05c06710ff3db1f22f68b20acbe9.zip |
small bug: lua_gc(count) was falling through to next option
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.14 2004/07/09 14:20:22 roberto Exp roberto $ | 2 | ** $Id: lapi.c,v 2.15 2004/08/10 19:17:23 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 | */ |
@@ -841,6 +841,7 @@ LUA_API int lua_gc (lua_State *L, int what, int data) { | |||
841 | case LUA_GCCOUNT: { | 841 | case LUA_GCCOUNT: { |
842 | /* GC values are expressed in Kbytes: #bytes/2^10 */ | 842 | /* GC values are expressed in Kbytes: #bytes/2^10 */ |
843 | res = cast(int, g->nblocks >> 10); | 843 | res = cast(int, g->nblocks >> 10); |
844 | break; | ||
844 | } | 845 | } |
845 | case LUA_GCSTEP: { | 846 | case LUA_GCSTEP: { |
846 | lu_mem a = (cast(lu_mem, data) << 10); | 847 | lu_mem a = (cast(lu_mem, data) << 10); |