diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2020-01-31 11:09:53 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2020-01-31 11:09:53 -0300 |
| commit | 46c3587a6feb28e1ee4a32aabe463b0ecb9e8f5e (patch) | |
| tree | 7e1ae9b55536171511506532a04f4ebe6dc764b0 /lstate.h | |
| parent | 69c7139ff88bf26e05d80bf19d0351e5c88d13a3 (diff) | |
| download | lua-46c3587a6feb28e1ee4a32aabe463b0ecb9e8f5e.tar.gz lua-46c3587a6feb28e1ee4a32aabe463b0ecb9e8f5e.tar.bz2 lua-46c3587a6feb28e1ee4a32aabe463b0ecb9e8f5e.zip | |
Clearer distinction between types and tags
LUA_T* represents only types; tags (types + Variants) are represented
by LUA_V* constants.
Diffstat (limited to 'lstate.h')
| -rw-r--r-- | lstate.h | 14 |
1 files changed, 7 insertions, 7 deletions
| @@ -327,15 +327,15 @@ union GCUnion { | |||
| 327 | /* macros to convert a GCObject into a specific value */ | 327 | /* macros to convert a GCObject into a specific value */ |
| 328 | #define gco2ts(o) \ | 328 | #define gco2ts(o) \ |
| 329 | check_exp(novariant((o)->tt) == LUA_TSTRING, &((cast_u(o))->ts)) | 329 | check_exp(novariant((o)->tt) == LUA_TSTRING, &((cast_u(o))->ts)) |
| 330 | #define gco2u(o) check_exp((o)->tt == LUA_TUSERDATA, &((cast_u(o))->u)) | 330 | #define gco2u(o) check_exp((o)->tt == LUA_VUSERDATA, &((cast_u(o))->u)) |
| 331 | #define gco2lcl(o) check_exp((o)->tt == LUA_TLCL, &((cast_u(o))->cl.l)) | 331 | #define gco2lcl(o) check_exp((o)->tt == LUA_VLCL, &((cast_u(o))->cl.l)) |
| 332 | #define gco2ccl(o) check_exp((o)->tt == LUA_TCCL, &((cast_u(o))->cl.c)) | 332 | #define gco2ccl(o) check_exp((o)->tt == LUA_VCCL, &((cast_u(o))->cl.c)) |
| 333 | #define gco2cl(o) \ | 333 | #define gco2cl(o) \ |
| 334 | check_exp(novariant((o)->tt) == LUA_TFUNCTION, &((cast_u(o))->cl)) | 334 | check_exp(novariant((o)->tt) == LUA_TFUNCTION, &((cast_u(o))->cl)) |
| 335 | #define gco2t(o) check_exp((o)->tt == LUA_TTABLE, &((cast_u(o))->h)) | 335 | #define gco2t(o) check_exp((o)->tt == LUA_VTABLE, &((cast_u(o))->h)) |
| 336 | #define gco2p(o) check_exp((o)->tt == LUA_TPROTO, &((cast_u(o))->p)) | 336 | #define gco2p(o) check_exp((o)->tt == LUA_VPROTO, &((cast_u(o))->p)) |
| 337 | #define gco2th(o) check_exp((o)->tt == LUA_TTHREAD, &((cast_u(o))->th)) | 337 | #define gco2th(o) check_exp((o)->tt == LUA_VTHREAD, &((cast_u(o))->th)) |
| 338 | #define gco2upv(o) check_exp((o)->tt == LUA_TUPVAL, &((cast_u(o))->upv)) | 338 | #define gco2upv(o) check_exp((o)->tt == LUA_VUPVAL, &((cast_u(o))->upv)) |
| 339 | 339 | ||
| 340 | 340 | ||
| 341 | /* | 341 | /* |
