]> git.ipfire.org Git - thirdparty/LuaJIT.git/commitdiff
Fix for last commit
authorMike Pall <mike>
Tue, 5 Nov 2013 18:45:04 +0000 (19:45 +0100)
committerMike Pall <mike>
Tue, 5 Nov 2013 18:45:04 +0000 (19:45 +0100)
src/lj_api.c
src/lj_gc.c

index edb2d620dabf7962f22927246dccfb7dba127f6a..b5c43bea38fc9dbf4a1a8968357706f36d57d02f 100644 (file)
@@ -1164,7 +1164,7 @@ LUA_API int lua_gc(lua_State *L, int what, int data)
     MSize a = (MSize)data << 10;
     g->gc.threshold = (a <= g->gc.total) ? (g->gc.total - a) : 0;
     while (g->gc.total >= g->gc.threshold)
-      if (lj_gc_step(L)) {
+      if (lj_gc_step(L) > 0) {
        res = 1;
        break;
       }
index 7012dbecef9eb782e91056623917f11e017ee41b..2a4d299b75a0b8ef41f110e6910382dd73236b76 100644 (file)
@@ -690,7 +690,7 @@ int LJ_FASTCALL lj_gc_step(lua_State *L)
   if (g->gc.debt < GCSTEPSIZE) {
     g->gc.threshold = g->gc.total + GCSTEPSIZE;
     g->vmstate = ostate;
-    return 1;
+    return -1;
   } else {
     g->gc.debt -= GCSTEPSIZE;
     g->gc.threshold = g->gc.total;