aboutsummaryrefslogtreecommitdiff
path: root/lstate.h
diff options
context:
space:
mode:
authorRoberto I <roberto@inf.puc-rio.br>2025-08-20 14:18:12 -0300
committerRoberto I <roberto@inf.puc-rio.br>2025-08-20 14:18:12 -0300
commitc688b00f73205273c46d7cf5656ff5a27e90ce36 (patch)
tree8fc8f673b350345ade1eee4c879b639e1f4f7f95 /lstate.h
parentdd095677e38a104d0fd073f31530e08c9f5286fc (diff)
downloadlua-c688b00f73205273c46d7cf5656ff5a27e90ce36.tar.gz
lua-c688b00f73205273c46d7cf5656ff5a27e90ce36.tar.bz2
lua-c688b00f73205273c46d7cf5656ff5a27e90ce36.zip
Detail in 'obj2gco'
Its check should use the type of the object, not its tag. (Change only relevant in test mode.)
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 80df3b0a..a4d5570c 100644
--- a/lstate.h
+++ b/lstate.h
@@ -430,9 +430,9 @@ union GCUnion {
430 430
431/* 431/*
432** macro to convert a Lua object into a GCObject 432** macro to convert a Lua object into a GCObject
433** (The access to 'tt' tries to ensure that 'v' is actually a Lua object.)
434*/ 433*/
435#define obj2gco(v) check_exp((v)->tt >= LUA_TSTRING, &(cast_u(v)->gc)) 434#define obj2gco(v) \
435 check_exp(novariant((v)->tt) >= LUA_TSTRING, &(cast_u(v)->gc))
436 436
437 437
438/* actual number of total memory allocated */ 438/* actual number of total memory allocated */