summaryrefslogtreecommitdiff
path: root/ltm.c
diff options
context:
space:
mode:
Diffstat (limited to 'ltm.c')
-rw-r--r--ltm.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/ltm.c b/ltm.c
index 37b5cd3d..dc2e922b 100644
--- a/ltm.c
+++ b/ltm.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltm.c,v 2.25 2013/12/30 20:47:58 roberto Exp $ 2** $Id: ltm.c,v 2.26 2014/04/11 20:17:39 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*/
@@ -129,19 +129,6 @@ void luaT_trybinTM (lua_State *L, const TValue *p1, const TValue *p2,
129} 129}
130 130
131 131
132const TValue *luaT_getequalTM (lua_State *L, Table *mt1, Table *mt2) {
133 const TValue *tm1 = fasttm(L, mt1, TM_EQ);
134 const TValue *tm2;
135 if (tm1 == NULL) return NULL; /* no metamethod */
136 if (mt1 == mt2) return tm1; /* same metatables => same metamethods */
137 tm2 = fasttm(L, mt2, TM_EQ);
138 if (tm2 == NULL) return NULL; /* no metamethod */
139 if (luaV_rawequalobj(tm1, tm2)) /* same metamethods? */
140 return tm1;
141 return NULL;
142}
143
144
145int luaT_callorderTM (lua_State *L, const TValue *p1, const TValue *p2, 132int luaT_callorderTM (lua_State *L, const TValue *p1, const TValue *p2,
146 TMS event) { 133 TMS event) {
147 if (!luaT_callbinTM(L, p1, p2, L->top, event)) 134 if (!luaT_callbinTM(L, p1, p2, L->top, event))