first (parcial) implementation of 'keyin'/'removekey'
(still no metamethods, no raw verssions)
This commit is contained in:
17
lobject.h
17
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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user