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 /lobject.h | |
parent | 748d6d4e7a1ac247071f6354f2700d1d0ee46b24 (diff) | |
download | lua-e1ceea56740ea119e4ead68c4389407024da523d.tar.gz lua-e1ceea56740ea119e4ead68c4389407024da523d.tar.bz2 lua-e1ceea56740ea119e4ead68c4389407024da523d.zip |
Cleaner definition for macro 'ttisclosure'
Diffstat (limited to 'lobject.h')
-rw-r--r-- | lobject.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -570,10 +570,11 @@ typedef struct Proto { | |||
570 | #define LUA_VCCL makevariant(LUA_TFUNCTION, 2) /* C closure */ | 570 | #define LUA_VCCL makevariant(LUA_TFUNCTION, 2) /* C closure */ |
571 | 571 | ||
572 | #define ttisfunction(o) checktype(o, LUA_TFUNCTION) | 572 | #define ttisfunction(o) checktype(o, LUA_TFUNCTION) |
573 | #define ttisclosure(o) ((rawtt(o) & 0x1F) == LUA_VLCL) | ||
574 | #define ttisLclosure(o) checktag((o), ctb(LUA_VLCL)) | 573 | #define ttisLclosure(o) checktag((o), ctb(LUA_VLCL)) |
575 | #define ttislcf(o) checktag((o), LUA_VLCF) | 574 | #define ttislcf(o) checktag((o), LUA_VLCF) |
576 | #define ttisCclosure(o) checktag((o), ctb(LUA_VCCL)) | 575 | #define ttisCclosure(o) checktag((o), ctb(LUA_VCCL)) |
576 | #define ttisclosure(o) (ttisLclosure(o) || ttisCclosure(o)) | ||
577 | |||
577 | 578 | ||
578 | #define isLfunction(o) ttisLclosure(o) | 579 | #define isLfunction(o) ttisLclosure(o) |
579 | 580 | ||