aboutsummaryrefslogtreecommitdiff
path: root/ltm.c
diff options
context:
space:
mode:
Diffstat (limited to 'ltm.c')
-rw-r--r--ltm.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ltm.c b/ltm.c
index 3f29c83b..0187c6f5 100644
--- a/ltm.c
+++ b/ltm.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltm.c,v 2.62 2018/02/17 19:20:00 roberto Exp roberto $ 2** $Id: ltm.c,v 2.63 2018/02/21 15:49:32 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*/
@@ -60,7 +60,7 @@ void luaT_init (lua_State *L) {
60const TValue *luaT_gettm (Table *events, TMS event, TString *ename) { 60const TValue *luaT_gettm (Table *events, TMS event, TString *ename) {
61 const TValue *tm = luaH_getshortstr(events, ename); 61 const TValue *tm = luaH_getshortstr(events, ename);
62 lua_assert(event <= TM_EQ); 62 lua_assert(event <= TM_EQ);
63 if (ttisnil(tm)) { /* no tag method? */ 63 if (notm(tm)) { /* no tag method? */
64 events->flags |= cast_byte(1u<<event); /* cache this fact */ 64 events->flags |= cast_byte(1u<<event); /* cache this fact */
65 return NULL; 65 return NULL;
66 } 66 }
@@ -137,9 +137,9 @@ void luaT_callTMres (lua_State *L, const TValue *f, const TValue *p1,
137static int callbinTM (lua_State *L, const TValue *p1, const TValue *p2, 137static int callbinTM (lua_State *L, const TValue *p1, const TValue *p2,
138 StkId res, TMS event) { 138 StkId res, TMS event) {
139 const TValue *tm = luaT_gettmbyobj(L, p1, event); /* try first operand */ 139 const TValue *tm = luaT_gettmbyobj(L, p1, event); /* try first operand */
140 if (ttisnil(tm)) 140 if (notm(tm))
141 tm = luaT_gettmbyobj(L, p2, event); /* try second operand */ 141 tm = luaT_gettmbyobj(L, p2, event); /* try second operand */
142 if (ttisnil(tm)) return 0; 142 if (notm(tm)) return 0;
143 luaT_callTMres(L, tm, p1, p2, res); 143 luaT_callTMres(L, tm, p1, p2, res);
144 return 1; 144 return 1;
145} 145}