From d766e2ae175495da85714d00e61d76174c5acc5b Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Sun, 25 Feb 2018 09:48:16 -0300 Subject: first (parcial) implementation of 'keyin'/'removekey' (still no metamethods, no raw verssions) --- lobject.h | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'lobject.h') diff --git a/lobject.h b/lobject.h index c6590cf0..da110128 100644 --- a/lobject.h +++ b/lobject.h @@ -1,5 +1,5 @@ /* -** $Id: lobject.h,v 2.136 2018/02/22 17:28:10 roberto Exp roberto $ +** $Id: lobject.h,v 2.137 2018/02/23 13:13:31 roberto Exp roberto $ ** Type definitions for Lua objects ** See Copyright Notice in lua.h */ @@ -156,13 +156,20 @@ typedef StackValue *StkId; /* index to stack elements */ #define LUA_TEMPTY (LUA_TNIL | (1 << 4)) #define ttisnilorempty(v) checktype((v), LUA_TNIL) -/* -** By default, entries with any kind of nil are considered empty -*/ -#define isempty(v) ttisnilorempty(v) #define isreallyempty(v) checktag((v), LUA_TEMPTY) + +#if defined(LUA_NILINTABLE) + +#define isempty(v) isreallyempty(v) + +#else /* By default, entries with any kind of nil are considered empty */ + +#define isempty(v) ttisnilorempty(v) + +#endif + /* macro defining an empty value */ #define EMPTYCONSTANT {NULL}, LUA_TEMPTY -- cgit v1.2.3-55-g6feb