lua

A copy of the Lua development repository
Log | Files | Refs | README

commit e1ceea56740ea119e4ead68c4389407024da523d
parent 748d6d4e7a1ac247071f6354f2700d1d0ee46b24
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date:   Wed, 16 Dec 2020 11:02:13 -0300

Cleaner definition for macro 'ttisclosure'

Diffstat:
Mlobject.h | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lobject.h b/lobject.h @@ -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)