Browse Source

small bug: lua_gc(count) was falling through to next option

v5-2
Roberto Ierusalimschy 21 years ago
parent
commit
a7c74c06b9
  1. 3
      lapi.c

3
lapi.c

@ -1,5 +1,5 @@
/*
** $Id: lapi.c,v 2.14 2004/07/09 14:20:22 roberto Exp roberto $
** $Id: lapi.c,v 2.15 2004/08/10 19:17:23 roberto Exp roberto $
** Lua API
** See Copyright Notice in lua.h
*/
@ -841,6 +841,7 @@ LUA_API int lua_gc (lua_State *L, int what, int data) {
case LUA_GCCOUNT: {
/* GC values are expressed in Kbytes: #bytes/2^10 */
res = cast(int, g->nblocks >> 10);
break;
}
case LUA_GCSTEP: {
lu_mem a = (cast(lu_mem, data) << 10);

Loading…
Cancel
Save