diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2025-01-31 13:51:38 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2025-01-31 13:51:38 -0300 |
commit | fa1382b5cd504bdfc5fc3f5c447ed09a4c9804fd (patch) | |
tree | 5c5f4f75e46a0ce1e82eca4395457627895c665c /ltests.c | |
parent | d1e677c52be3b107a7a29fdc482158f6d9251e79 (diff) | |
download | lua-fa1382b5cd504bdfc5fc3f5c447ed09a4c9804fd.tar.gz lua-fa1382b5cd504bdfc5fc3f5c447ed09a4c9804fd.tar.bz2 lua-fa1382b5cd504bdfc5fc3f5c447ed09a4c9804fd.zip |
Main thread is a regular field of global_State
They were already allocated as a single block, so there is no need
for the global_State to point to its main thread.
Diffstat (limited to 'ltests.c')
-rw-r--r-- | ltests.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -408,7 +408,7 @@ static void checktable (global_State *g, Table *h) { | |||
408 | for (n = gnode(h, 0); n < limit; n++) { | 408 | for (n = gnode(h, 0); n < limit; n++) { |
409 | if (!isempty(gval(n))) { | 409 | if (!isempty(gval(n))) { |
410 | TValue k; | 410 | TValue k; |
411 | getnodekey(g->mainthread, &k, n); | 411 | getnodekey(mainthread(g), &k, n); |
412 | assert(!keyisnil(n)); | 412 | assert(!keyisnil(n)); |
413 | checkvalref(g, hgc, &k); | 413 | checkvalref(g, hgc, &k); |
414 | checkvalref(g, hgc, gval(n)); | 414 | checkvalref(g, hgc, gval(n)); |
@@ -672,7 +672,7 @@ int lua_checkmemory (lua_State *L) { | |||
672 | l_mem totalin; /* total of objects that are in gray lists */ | 672 | l_mem totalin; /* total of objects that are in gray lists */ |
673 | l_mem totalshould; /* total of objects that should be in gray lists */ | 673 | l_mem totalshould; /* total of objects that should be in gray lists */ |
674 | if (keepinvariant(g)) { | 674 | if (keepinvariant(g)) { |
675 | assert(!iswhite(g->mainthread)); | 675 | assert(!iswhite(mainthread(g))); |
676 | assert(!iswhite(gcvalue(&g->l_registry))); | 676 | assert(!iswhite(gcvalue(&g->l_registry))); |
677 | } | 677 | } |
678 | assert(!isdead(g, gcvalue(&g->l_registry))); | 678 | assert(!isdead(g, gcvalue(&g->l_registry))); |