diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2020-12-16 11:02:40 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2020-12-16 11:02:40 -0300 |
commit | e1ceea56740ea119e4ead68c4389407024da523d (patch) | |
tree | cd989395876b991ad40db004ef45ef5c085044ee | |
parent | 748d6d4e7a1ac247071f6354f2700d1d0ee46b24 (diff) | |
download | lua-github-e1ceea56740ea119e4ead68c4389407024da523d.tar.gz |
Cleaner definition for macro 'ttisclosure'
-rw-r--r-- | lobject.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -570,10 +570,11 @@ typedef struct Proto { #define LUA_VCCL makevariant(LUA_TFUNCTION, 2) /* C closure */ #define ttisfunction(o) checktype(o, LUA_TFUNCTION) -#define ttisclosure(o) ((rawtt(o) & 0x1F) == LUA_VLCL) #define ttisLclosure(o) checktag((o), ctb(LUA_VLCL)) #define ttislcf(o) checktag((o), LUA_VLCF) #define ttisCclosure(o) checktag((o), ctb(LUA_VCCL)) +#define ttisclosure(o) (ttisLclosure(o) || ttisCclosure(o)) + #define isLfunction(o) ttisLclosure(o) |