aboutsummaryrefslogtreecommitdiff
path: root/ltm.h
diff options
context:
space:
mode:
Diffstat (limited to 'ltm.h')
-rw-r--r--ltm.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/ltm.h b/ltm.h
index dbb21bd5..9b25ef08 100644
--- a/ltm.h
+++ b/ltm.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltm.h,v 2.31 2018/02/09 15:16:06 roberto Exp roberto $ 2** $Id: ltm.h,v 2.32 2018/02/17 19:20:00 roberto Exp roberto $
3** Tag methods 3** Tag methods
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -45,6 +45,12 @@ typedef enum {
45} TMS; 45} TMS;
46 46
47 47
48/*
49** Test whether there is no tagmethod.
50** (Because tagmethods use raw accesses, the result may be an "empty" nil.)
51*/
52#define notm(tm) ttisnilorempty(tm)
53
48 54
49#define gfasttm(g,et,e) ((et) == NULL ? NULL : \ 55#define gfasttm(g,et,e) ((et) == NULL ? NULL : \
50 ((et)->flags & (1u<<(e))) ? NULL : luaT_gettm(et, e, (g)->tmname[e])) 56 ((et)->flags & (1u<<(e))) ? NULL : luaT_gettm(et, e, (g)->tmname[e]))