diff options
Diffstat (limited to 'ltm.c')
-rw-r--r-- | ltm.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -188,6 +188,7 @@ int luaT_callorderTM (lua_State *L, const TValue *p1, const TValue *p2, | |||
188 | TMS event) { | 188 | TMS event) { |
189 | if (callbinTM(L, p1, p2, L->top, event)) /* try original event */ | 189 | if (callbinTM(L, p1, p2, L->top, event)) /* try original event */ |
190 | return !l_isfalse(s2v(L->top)); | 190 | return !l_isfalse(s2v(L->top)); |
191 | #if defined(LUA_COMPAT_LT_LE) | ||
191 | else if (event == TM_LE) { | 192 | else if (event == TM_LE) { |
192 | /* try '!(p2 < p1)' for '(p1 <= p2)' */ | 193 | /* try '!(p2 < p1)' for '(p1 <= p2)' */ |
193 | L->ci->callstatus |= CIST_LEQ; /* mark it is doing 'lt' for 'le' */ | 194 | L->ci->callstatus |= CIST_LEQ; /* mark it is doing 'lt' for 'le' */ |
@@ -197,6 +198,7 @@ int luaT_callorderTM (lua_State *L, const TValue *p1, const TValue *p2, | |||
197 | } | 198 | } |
198 | /* else error will remove this 'ci'; no need to clear mark */ | 199 | /* else error will remove this 'ci'; no need to clear mark */ |
199 | } | 200 | } |
201 | #endif | ||
200 | luaG_ordererror(L, p1, p2); /* no metamethod found */ | 202 | luaG_ordererror(L, p1, p2); /* no metamethod found */ |
201 | return 0; /* to avoid warnings */ | 203 | return 0; /* to avoid warnings */ |
202 | } | 204 | } |