mirror of
https://github.com/lua/lua
synced 2025-01-07 18:12:00 +03:00
small bug: lua_gc(count) was falling through to next option
This commit is contained in:
parent
c7dda42c2f
commit
a7c74c06b9
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
|
** Lua API
|
||||||
** See Copyright Notice in lua.h
|
** 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: {
|
case LUA_GCCOUNT: {
|
||||||
/* GC values are expressed in Kbytes: #bytes/2^10 */
|
/* GC values are expressed in Kbytes: #bytes/2^10 */
|
||||||
res = cast(int, g->nblocks >> 10);
|
res = cast(int, g->nblocks >> 10);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
case LUA_GCSTEP: {
|
case LUA_GCSTEP: {
|
||||||
lu_mem a = (cast(lu_mem, data) << 10);
|
lu_mem a = (cast(lu_mem, data) << 10);
|
||||||
|
Loading…
Reference in New Issue
Block a user