Add collectgarbage("isrunning").

This commit is contained in:
Mike Pall
2015-10-01 16:26:00 +02:00
parent 0b09c971c9
commit 86c21bd245
3 changed files with 6 additions and 2 deletions

View File

@@ -1188,6 +1188,9 @@ LUA_API int lua_gc(lua_State *L, int what, int data)
res = (int)(g->gc.stepmul);
g->gc.stepmul = (MSize)data;
break;
case LUA_GCISRUNNING:
res = (g->gc.threshold != LJ_MAX_MEM);
break;
default:
res = -1; /* Invalid option. */
}