diff options
author | Mike Pall <mike> | 2013-11-05 19:45:04 +0100 |
---|---|---|
committer | Mike Pall <mike> | 2013-11-05 19:45:04 +0100 |
commit | 8941b1994e1bb2a82cb8221eb5063bfb6e0ef81b (patch) | |
tree | 733f86c358a91a67efc1f07b94e352baed115f02 | |
parent | 7b4d5306c7441a373516ee54bd942218f35348c2 (diff) | |
download | luajit-8941b1994e1bb2a82cb8221eb5063bfb6e0ef81b.tar.gz luajit-8941b1994e1bb2a82cb8221eb5063bfb6e0ef81b.tar.bz2 luajit-8941b1994e1bb2a82cb8221eb5063bfb6e0ef81b.zip |
Fix for last commit
-rw-r--r-- | src/lj_api.c | 2 | ||||
-rw-r--r-- | src/lj_gc.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/lj_api.c b/src/lj_api.c index edb2d620..b5c43bea 100644 --- a/src/lj_api.c +++ b/src/lj_api.c | |||
@@ -1164,7 +1164,7 @@ LUA_API int lua_gc(lua_State *L, int what, int data) | |||
1164 | MSize a = (MSize)data << 10; | 1164 | MSize a = (MSize)data << 10; |
1165 | g->gc.threshold = (a <= g->gc.total) ? (g->gc.total - a) : 0; | 1165 | g->gc.threshold = (a <= g->gc.total) ? (g->gc.total - a) : 0; |
1166 | while (g->gc.total >= g->gc.threshold) | 1166 | while (g->gc.total >= g->gc.threshold) |
1167 | if (lj_gc_step(L)) { | 1167 | if (lj_gc_step(L) > 0) { |
1168 | res = 1; | 1168 | res = 1; |
1169 | break; | 1169 | break; |
1170 | } | 1170 | } |
diff --git a/src/lj_gc.c b/src/lj_gc.c index 7012dbec..2a4d299b 100644 --- a/src/lj_gc.c +++ b/src/lj_gc.c | |||
@@ -690,7 +690,7 @@ int LJ_FASTCALL lj_gc_step(lua_State *L) | |||
690 | if (g->gc.debt < GCSTEPSIZE) { | 690 | if (g->gc.debt < GCSTEPSIZE) { |
691 | g->gc.threshold = g->gc.total + GCSTEPSIZE; | 691 | g->gc.threshold = g->gc.total + GCSTEPSIZE; |
692 | g->vmstate = ostate; | 692 | g->vmstate = ostate; |
693 | return 1; | 693 | return -1; |
694 | } else { | 694 | } else { |
695 | g->gc.debt -= GCSTEPSIZE; | 695 | g->gc.debt -= GCSTEPSIZE; |
696 | g->gc.threshold = g->gc.total; | 696 | g->gc.threshold = g->gc.total; |