| 185 | |
| 186 | |
| 187 | static const TValue *get_equalTM (lua_State *L, Table *mt1, Table *mt2, |
| 188 | TMS event) { |
| 189 | const TValue *tm1 = fasttm(L, mt1, event); |
| 190 | const TValue *tm2; |
| 191 | if (tm1 == NULL) return NULL; /* no metamethod */ |
| 192 | if (mt1 == mt2) return tm1; /* same metatables => same metamethods */ |
| 193 | tm2 = fasttm(L, mt2, event); |
| 194 | if (tm2 == NULL) return NULL; /* no metamethod */ |
| 195 | if (luaV_rawequalobj(tm1, tm2)) /* same metamethods? */ |
| 196 | return tm1; |
| 197 | return NULL; |
| 198 | } |
| 199 | |
| 200 | |
| 201 | static int call_orderTM (lua_State *L, const TValue *p1, const TValue *p2, |