diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-03-21 15:12:21 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-03-21 15:12:21 -0300 |
commit | ad24cff0f1108ee8e2c28f72e10da44ea2205c10 (patch) | |
tree | 20cd9be6bb5cd146e8cb9884d20495ab3e3ac1fc /lapi.c | |
parent | 6d475731cae37e8e46abf217697198bcce316b42 (diff) | |
download | lua-ad24cff0f1108ee8e2c28f72e10da44ea2205c10.tar.gz lua-ad24cff0f1108ee8e2c28f72e10da44ea2205c10.tar.bz2 lua-ad24cff0f1108ee8e2c28f72e10da44ea2205c10.zip |
lua_gc(STEP) returns whether collection cycle finished
Diffstat (limited to 'lapi.c')
-rw-r--r-- | lapi.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lapi.c,v 2.33 2005/03/18 18:55:45 roberto Exp roberto $ | 2 | ** $Id: lapi.c,v 2.34 2005/03/18 20:11:28 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 | */ |
@@ -909,6 +909,8 @@ LUA_API int lua_gc (lua_State *L, int what, int data) { | |||
909 | g->GCthreshold = 0; | 909 | g->GCthreshold = 0; |
910 | while (g->GCthreshold <= g->totalbytes) | 910 | while (g->GCthreshold <= g->totalbytes) |
911 | luaC_step(L); | 911 | luaC_step(L); |
912 | if (g->gcstate == GCSpause) /* end of cycle? */ | ||
913 | res = 1; /* signal it */ | ||
912 | break; | 914 | break; |
913 | } | 915 | } |
914 | case LUA_GCSETPACE: { | 916 | case LUA_GCSETPACE: { |