aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Pall <mike>2013-11-05 19:46:41 +0100
committerMike Pall <mike>2013-11-05 19:46:41 +0100
commit8a2b2beac2ef985965fd6e4b4a0a32a684fa51df (patch)
treee72d9da3303010acb296e336c9bfe23d50fb87a0 /src
parent5c55b766bd008b60be973b51596f3a72d16b695b (diff)
parent8941b1994e1bb2a82cb8221eb5063bfb6e0ef81b (diff)
downloadluajit-8a2b2beac2ef985965fd6e4b4a0a32a684fa51df.tar.gz
luajit-8a2b2beac2ef985965fd6e4b4a0a32a684fa51df.tar.bz2
luajit-8a2b2beac2ef985965fd6e4b4a0a32a684fa51df.zip
Merge branch 'master' into v2.1
Diffstat (limited to 'src')
-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;