| 174 | |
| 175 | |
| 176 | static const TValue *get_compTM (lua_State *L, Table *mt1, Table *mt2, |
| 177 | TMS event) { |
| 178 | const TValue *tm1 = fasttm(L, mt1, event); |
| 179 | const TValue *tm2; |
| 180 | if (tm1 == NULL) return NULL; /* no metamethod */ |
| 181 | if (mt1 == mt2) return tm1; /* same metatables => same metamethods */ |
| 182 | tm2 = fasttm(L, mt2, event); |
| 183 | if (tm2 == NULL) return NULL; /* no metamethod */ |
| 184 | if (luaO_rawequalObj(tm1, tm2)) /* same metamethods? */ |
| 185 | return tm1; |
| 186 | return NULL; |
| 187 | } |
| 188 | |
| 189 | |
| 190 | static int call_orderTM (lua_State *L, const TValue *p1, const TValue *p2, |
no test coverage detected