diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-10-20 09:35:50 -0200 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-10-20 09:35:50 -0200 |
| commit | 9f4211310fcea9ebf08f4884f8665520c1b8d85f (patch) | |
| tree | 7a58485c291dfc3154c6ea110c9ff65aac26172b /lapi.c | |
| parent | 515d55683224eb78b8e8c69d3b0c7ed7a7c2076f (diff) | |
| download | lua-9f4211310fcea9ebf08f4884f8665520c1b8d85f.tar.gz lua-9f4211310fcea9ebf08f4884f8665520c1b8d85f.tar.bz2 lua-9f4211310fcea9ebf08f4884f8665520c1b8d85f.zip | |
more precision for gc count
Diffstat (limited to 'lapi.c')
| -rw-r--r-- | lapi.c | 6 |
1 files changed, 5 insertions, 1 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lapi.c,v 2.49 2005/09/14 17:44:48 roberto Exp roberto $ | 2 | ** $Id: lapi.c,v 2.50 2005/09/20 17:55:10 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 | */ |
| @@ -913,6 +913,10 @@ LUA_API int lua_gc (lua_State *L, int what, int data) { | |||
| 913 | res = cast(int, g->totalbytes >> 10); | 913 | res = cast(int, g->totalbytes >> 10); |
| 914 | break; | 914 | break; |
| 915 | } | 915 | } |
| 916 | case LUA_GCCOUNTB: { | ||
| 917 | res = cast(int, g->totalbytes & 0x3ff); | ||
| 918 | break; | ||
| 919 | } | ||
| 916 | case LUA_GCSTEP: { | 920 | case LUA_GCSTEP: { |
| 917 | lu_mem a = (cast(lu_mem, data) << 10); | 921 | lu_mem a = (cast(lu_mem, data) << 10); |
| 918 | if (a <= g->totalbytes) | 922 | if (a <= g->totalbytes) |
