From fa1382b5cd504bdfc5fc3f5c447ed09a4c9804fd Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Fri, 31 Jan 2025 13:51:38 -0300 Subject: 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. --- ltests.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ltests.c') diff --git a/ltests.c b/ltests.c index 6b5dc276..f4855fea 100644 --- a/ltests.c +++ b/ltests.c @@ -408,7 +408,7 @@ static void checktable (global_State *g, Table *h) { for (n = gnode(h, 0); n < limit; n++) { if (!isempty(gval(n))) { TValue k; - getnodekey(g->mainthread, &k, n); + getnodekey(mainthread(g), &k, n); assert(!keyisnil(n)); checkvalref(g, hgc, &k); checkvalref(g, hgc, gval(n)); @@ -672,7 +672,7 @@ int lua_checkmemory (lua_State *L) { l_mem totalin; /* total of objects that are in gray lists */ l_mem totalshould; /* total of objects that should be in gray lists */ if (keepinvariant(g)) { - assert(!iswhite(g->mainthread)); + assert(!iswhite(mainthread(g))); assert(!iswhite(gcvalue(&g->l_registry))); } assert(!isdead(g, gcvalue(&g->l_registry))); -- cgit v1.2.3-55-g6feb