aboutsummaryrefslogtreecommitdiff
path: root/lstate.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2025-07-07 15:03:45 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2025-07-07 15:03:45 -0300
commit848568790826b7e201f84682185b5b605c473016 (patch)
treecd3131004afd2d77702c1b7b4abc556911cf26c9 /lstate.h
parent03d672a95cfd287855b373587f3975165eab9e02 (diff)
downloadlua-848568790826b7e201f84682185b5b605c473016.tar.gz
lua-848568790826b7e201f84682185b5b605c473016.tar.bz2
lua-848568790826b7e201f84682185b5b605c473016.zip
Correction in definition of CIST_FRESH
The cast must be made before the shift. If int has 16 bits, the shift would zero the value and the cast would cast 0 to 0.
Diffstat (limited to 'lstate.h')
-rw-r--r--lstate.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/lstate.h b/lstate.h
index f841c232..80df3b0a 100644
--- a/lstate.h
+++ b/lstate.h
@@ -85,7 +85,7 @@ typedef struct CallInfo CallInfo;
85** they must be visited again at the end of the cycle), but they are 85** they must be visited again at the end of the cycle), but they are
86** marked black because assignments to them must activate barriers (to 86** marked black because assignments to them must activate barriers (to
87** move them back to TOUCHED1). 87** move them back to TOUCHED1).
88** - Open upvales are kept gray to avoid barriers, but they stay out 88** - Open upvalues are kept gray to avoid barriers, but they stay out
89** of gray lists. (They don't even have a 'gclist' field.) 89** of gray lists. (They don't even have a 'gclist' field.)
90*/ 90*/
91 91
@@ -232,7 +232,7 @@ struct CallInfo {
232/* call is running a C function (still in first 16 bits) */ 232/* call is running a C function (still in first 16 bits) */
233#define CIST_C (1u << (CIST_RECST + 3)) 233#define CIST_C (1u << (CIST_RECST + 3))
234/* call is on a fresh "luaV_execute" frame */ 234/* call is on a fresh "luaV_execute" frame */
235#define CIST_FRESH cast(l_uint32, CIST_C << 1) 235#define CIST_FRESH (cast(l_uint32, CIST_C) << 1)
236/* function is closing tbc variables */ 236/* function is closing tbc variables */
237#define CIST_CLSRET (CIST_FRESH << 1) 237#define CIST_CLSRET (CIST_FRESH << 1)
238/* function has tbc variables to close */ 238/* function has tbc variables to close */