diff options
| author | Roberto I <roberto@inf.puc-rio.br> | 2025-08-20 14:18:12 -0300 |
|---|---|---|
| committer | Roberto I <roberto@inf.puc-rio.br> | 2025-08-20 14:18:12 -0300 |
| commit | c688b00f73205273c46d7cf5656ff5a27e90ce36 (patch) | |
| tree | 8fc8f673b350345ade1eee4c879b639e1f4f7f95 /lstate.h | |
| parent | dd095677e38a104d0fd073f31530e08c9f5286fc (diff) | |
| download | lua-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.h | 4 |
1 files changed, 2 insertions, 2 deletions
| @@ -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 */ |
