mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-12 17:24:09 +00:00
Merge branch 'master' into v2.1
This commit is contained in:
commit
8a2b2beac2
@ -1153,7 +1153,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;
|
||||
}
|
||||
|
@ -685,7 +685,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;
|
||||
|
Loading…
Reference in New Issue
Block a user