From e1ceea56740ea119e4ead68c4389407024da523d Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Wed, 16 Dec 2020 11:02:40 -0300 Subject: Cleaner definition for macro 'ttisclosure' --- lobject.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lobject.h b/lobject.h index 1cc8e757..470b17d5 100644 --- 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) -- cgit v1.2.3-55-g6feb