mirror of
https://github.com/lua/lua.git
synced 2026-01-27 01:44:31 +00:00
Detail in 'obj2gco'
Its check should use the type of the object, not its tag. (Change only relevant in test mode.)
This commit is contained in:
parent
dd095677e3
commit
c688b00f73
4
lstate.h
4
lstate.h
@ -430,9 +430,9 @@ union GCUnion {
|
||||
|
||||
/*
|
||||
** macro to convert a Lua object into a GCObject
|
||||
** (The access to 'tt' tries to ensure that 'v' is actually a Lua object.)
|
||||
*/
|
||||
#define obj2gco(v) check_exp((v)->tt >= LUA_TSTRING, &(cast_u(v)->gc))
|
||||
#define obj2gco(v) \
|
||||
check_exp(novariant((v)->tt) >= LUA_TSTRING, &(cast_u(v)->gc))
|
||||
|
||||
|
||||
/* actual number of total memory allocated */
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user