From 9243c414d92c253edd908f438caa31e2aa16f3f4 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Fri, 23 Feb 2018 10:16:18 -0300 Subject: first version of empty entries in tables (so that, in the future, tables can contain regular nil entries) --- ltm.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'ltm.h') diff --git a/ltm.h b/ltm.h index dbb21bd5..9b25ef08 100644 --- a/ltm.h +++ b/ltm.h @@ -1,5 +1,5 @@ /* -** $Id: ltm.h,v 2.31 2018/02/09 15:16:06 roberto Exp roberto $ +** $Id: ltm.h,v 2.32 2018/02/17 19:20:00 roberto Exp roberto $ ** Tag methods ** See Copyright Notice in lua.h */ @@ -45,6 +45,12 @@ typedef enum { } TMS; +/* +** Test whether there is no tagmethod. +** (Because tagmethods use raw accesses, the result may be an "empty" nil.) +*/ +#define notm(tm) ttisnilorempty(tm) + #define gfasttm(g,et,e) ((et) == NULL ? NULL : \ ((et)->flags & (1u<<(e))) ? NULL : luaT_gettm(et, e, (g)->tmname[e])) -- cgit v1.2.3-55-g6feb