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. --- lapi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lapi.c') diff --git a/lapi.c b/lapi.c index b3062072..a5e94507 100644 --- a/lapi.c +++ b/lapi.c @@ -655,7 +655,7 @@ LUA_API int lua_pushthread (lua_State *L) { setthvalue(L, s2v(L->top.p), L); api_incr_top(L); lua_unlock(L); - return (G(L)->mainthread == L); + return (mainthread(G(L)) == L); } -- cgit v1.2.3-55-g6feb