aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/lj_api.c2
-rw-r--r--src/lj_gc.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/lj_api.c b/src/lj_api.c
index 05fb41a7..30b92924 100644
--- a/src/lj_api.c
+++ b/src/lj_api.c
@@ -1153,7 +1153,7 @@ LUA_API int lua_gc(lua_State *L, int what, int data)
1153 MSize a = (MSize)data << 10; 1153 MSize a = (MSize)data << 10;
1154 g->gc.threshold = (a <= g->gc.total) ? (g->gc.total - a) : 0; 1154 g->gc.threshold = (a <= g->gc.total) ? (g->gc.total - a) : 0;
1155 while (g->gc.total >= g->gc.threshold) 1155 while (g->gc.total >= g->gc.threshold)
1156 if (lj_gc_step(L)) { 1156 if (lj_gc_step(L) > 0) {
1157 res = 1; 1157 res = 1;
1158 break; 1158 break;
1159 } 1159 }
diff --git a/src/lj_gc.c b/src/lj_gc.c
index ddbaa645..592d770b 100644
--- a/src/lj_gc.c
+++ b/src/lj_gc.c
@@ -685,7 +685,7 @@ int LJ_FASTCALL lj_gc_step(lua_State *L)
685 if (g->gc.debt < GCSTEPSIZE) { 685 if (g->gc.debt < GCSTEPSIZE) {
686 g->gc.threshold = g->gc.total + GCSTEPSIZE; 686 g->gc.threshold = g->gc.total + GCSTEPSIZE;
687 g->vmstate = ostate; 687 g->vmstate = ostate;
688 return 1; 688 return -1;
689 } else { 689 } else {
690 g->gc.debt -= GCSTEPSIZE; 690 g->gc.debt -= GCSTEPSIZE;
691 g->gc.threshold = g->gc.total; 691 g->gc.threshold = g->gc.total;