aboutsummaryrefslogtreecommitdiff
path: root/lapi.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2025-01-31 13:51:38 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2025-01-31 13:51:38 -0300
commitfa1382b5cd504bdfc5fc3f5c447ed09a4c9804fd (patch)
tree5c5f4f75e46a0ce1e82eca4395457627895c665c /lapi.c
parentd1e677c52be3b107a7a29fdc482158f6d9251e79 (diff)
downloadlua-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 'lapi.c')
-rw-r--r--lapi.c2
1 files changed, 1 insertions, 1 deletions
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) {
655 setthvalue(L, s2v(L->top.p), L); 655 setthvalue(L, s2v(L->top.p), L);
656 api_incr_top(L); 656 api_incr_top(L);
657 lua_unlock(L); 657 lua_unlock(L);
658 return (G(L)->mainthread == L); 658 return (mainthread(G(L)) == L);
659} 659}
660 660
661 661