diff options
Diffstat (limited to 'ltests.c')
-rw-r--r-- | ltests.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -941,10 +941,10 @@ static int gc_printobj (lua_State *L) { | |||
941 | 941 | ||
942 | static int gc_state (lua_State *L) { | 942 | static int gc_state (lua_State *L) { |
943 | static const char *statenames[] = { | 943 | static const char *statenames[] = { |
944 | "propagate", "atomic", "enteratomic", "sweepallgc", "sweepfinobj", | 944 | "propagate", "atomic", "sweepallgc", "sweepfinobj", |
945 | "sweeptobefnz", "sweepend", "callfin", "pause", ""}; | 945 | "sweeptobefnz", "sweepend", "callfin", "pause", ""}; |
946 | static const int states[] = { | 946 | static const int states[] = { |
947 | GCSpropagate, GCSenteratomic, GCSatomic, GCSswpallgc, GCSswpfinobj, | 947 | GCSpropagate, GCSenteratomic, GCSswpallgc, GCSswpfinobj, |
948 | GCSswptobefnz, GCSswpend, GCScallfin, GCSpause, -1}; | 948 | GCSswptobefnz, GCSswpend, GCScallfin, GCSpause, -1}; |
949 | int option = states[luaL_checkoption(L, 1, "", statenames)]; | 949 | int option = states[luaL_checkoption(L, 1, "", statenames)]; |
950 | if (option == -1) { | 950 | if (option == -1) { |
@@ -957,9 +957,9 @@ static int gc_state (lua_State *L) { | |||
957 | luaL_error(L, "cannot change states in generational mode"); | 957 | luaL_error(L, "cannot change states in generational mode"); |
958 | lua_lock(L); | 958 | lua_lock(L); |
959 | if (option < g->gcstate) { /* must cross 'pause'? */ | 959 | if (option < g->gcstate) { /* must cross 'pause'? */ |
960 | luaC_runtilstate(L, bitmask(GCSpause)); /* run until pause */ | 960 | luaC_runtilstate(L, GCSpause, 1); /* run until pause */ |
961 | } | 961 | } |
962 | luaC_runtilstate(L, bitmask(option)); | 962 | luaC_runtilstate(L, option, 0); /* do not skip propagation state */ |
963 | lua_assert(G(L)->gcstate == option); | 963 | lua_assert(G(L)->gcstate == option); |
964 | lua_unlock(L); | 964 | lua_unlock(L); |
965 | return 0; | 965 | return 0; |