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 /lapi.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 'lapi.c')
-rw-r--r-- | lapi.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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 | ||