diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2012-01-20 20:05:50 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2012-01-20 20:05:50 -0200 |
commit | fd22ccd6d020bca1039626ee0c7de42b237a5686 (patch) | |
tree | c9f756634bec409b4ccb3f1a8e21357f409a7ddd /lstate.h | |
parent | 76eab106df01013de80033ac07586a79879fca55 (diff) | |
download | lua-fd22ccd6d020bca1039626ee0c7de42b237a5686.tar.gz lua-fd22ccd6d020bca1039626ee0c7de42b237a5686.tar.bz2 lua-fd22ccd6d020bca1039626ee0c7de42b237a5686.zip |
object tag keeps variant bits too -> no need for 'isC' field in
Closures + more strick typing for closure variants
Diffstat (limited to 'lstate.h')
-rw-r--r-- | lstate.h | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lstate.h,v 2.73 2011/08/23 17:24:34 roberto Exp roberto $ | 2 | ** $Id: lstate.h,v 2.74 2011/09/30 12:45:07 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 | */ |
@@ -197,7 +197,10 @@ union GCObject { | |||
197 | #define gco2ts(o) (&rawgco2ts(o)->tsv) | 197 | #define gco2ts(o) (&rawgco2ts(o)->tsv) |
198 | #define rawgco2u(o) check_exp((o)->gch.tt == LUA_TUSERDATA, &((o)->u)) | 198 | #define rawgco2u(o) check_exp((o)->gch.tt == LUA_TUSERDATA, &((o)->u)) |
199 | #define gco2u(o) (&rawgco2u(o)->uv) | 199 | #define gco2u(o) (&rawgco2u(o)->uv) |
200 | #define gco2cl(o) check_exp((o)->gch.tt == LUA_TFUNCTION, &((o)->cl)) | 200 | #define gco2lcl(o) check_exp((o)->gch.tt == LUA_TLCL, &((o)->cl.l)) |
201 | #define gco2ccl(o) check_exp((o)->gch.tt == LUA_TCCL, &((o)->cl.c)) | ||
202 | #define gco2cl(o) \ | ||
203 | check_exp(novariant((o)->gch.tt) == LUA_TFUNCTION, &((o)->cl)) | ||
201 | #define gco2t(o) check_exp((o)->gch.tt == LUA_TTABLE, &((o)->h)) | 204 | #define gco2t(o) check_exp((o)->gch.tt == LUA_TTABLE, &((o)->h)) |
202 | #define gco2p(o) check_exp((o)->gch.tt == LUA_TPROTO, &((o)->p)) | 205 | #define gco2p(o) check_exp((o)->gch.tt == LUA_TPROTO, &((o)->p)) |
203 | #define gco2uv(o) check_exp((o)->gch.tt == LUA_TUPVAL, &((o)->uv)) | 206 | #define gco2uv(o) check_exp((o)->gch.tt == LUA_TUPVAL, &((o)->uv)) |