aboutsummaryrefslogtreecommitdiff
path: root/lapi.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2012-05-11 16:22:33 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2012-05-11 16:22:33 -0300
commit31829ad1770223833bcbdab634e25cdfd911633d (patch)
treea3c5becabd437e7fc550ef19e1f38c69e18e70c9 /lapi.c
parentc2361e0b6108a2e7e53dcfcdc3a569fcc4a1e31d (diff)
downloadlua-31829ad1770223833bcbdab634e25cdfd911633d.tar.gz
lua-31829ad1770223833bcbdab634e25cdfd911633d.tar.bz2
lua-31829ad1770223833bcbdab634e25cdfd911633d.zip
test for whether collector is running moved from function to
macro 'luaC_condGC'.
Diffstat (limited to 'lapi.c')
-rw-r--r--lapi.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lapi.c b/lapi.c
index 924a9124..93616244 100644
--- a/lapi.c
+++ b/lapi.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lapi.c,v 2.158 2011/11/29 15:55:08 roberto Exp roberto $ 2** $Id: lapi.c,v 2.159 2011/11/30 12:32:05 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*/
@@ -1046,11 +1046,11 @@ LUA_API int lua_gc (lua_State *L, int what, int data) {
1046 case LUA_GCSTEP: { 1046 case LUA_GCSTEP: {
1047 if (g->gckind == KGC_GEN) { /* generational mode? */ 1047 if (g->gckind == KGC_GEN) { /* generational mode? */
1048 res = (g->lastmajormem == 0); /* 1 if will do major collection */ 1048 res = (g->lastmajormem == 0); /* 1 if will do major collection */
1049 luaC_forcestep(L); /* do a single step */ 1049 luaC_step(L); /* do a single step */
1050 } 1050 }
1051 else { 1051 else {
1052 while (data-- >= 0) { 1052 while (data-- >= 0) {
1053 luaC_forcestep(L); 1053 luaC_step(L);
1054 if (g->gcstate == GCSpause) { /* end of cycle? */ 1054 if (g->gcstate == GCSpause) { /* end of cycle? */
1055 res = 1; /* signal it */ 1055 res = 1; /* signal it */
1056 break; 1056 break;