diff options
Diffstat (limited to 'lstate.h')
-rw-r--r-- | lstate.h | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lstate.h,v 2.155 2018/02/15 18:06:24 roberto Exp roberto $ | 2 | ** $Id: lstate.h,v 2.156 2018/02/17 19:29:29 roberto Exp roberto $ |
3 | ** Global State | 3 | ** Global State |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -252,8 +252,11 @@ union GCUnion { | |||
252 | #define gco2upv(o) check_exp((o)->tt == LUA_TUPVAL, &((cast_u(o))->upv)) | 252 | #define gco2upv(o) check_exp((o)->tt == LUA_TUPVAL, &((cast_u(o))->upv)) |
253 | 253 | ||
254 | 254 | ||
255 | /* macro to convert a Lua object into a GCObject */ | 255 | /* |
256 | #define obj2gco(v) (&(cast_u(v)->gc)) | 256 | ** macro to convert a Lua object into a GCObject |
257 | ** (The access to 'tt' tries to ensure that 'v' is actually a Lua object.) | ||
258 | */ | ||
259 | #define obj2gco(v) check_exp((v)->tt >= LUA_TSTRING, &(cast_u(v)->gc)) | ||
257 | 260 | ||
258 | 261 | ||
259 | /* actual number of total bytes allocated */ | 262 | /* actual number of total bytes allocated */ |