Comment about LUA_COMPAT_LT_LE moved to proper place

This commit is contained in:
Roberto Ierusalimschy
2019-12-10 13:50:20 -03:00
parent 95735bda46
commit 1e0ad018ce
2 changed files with 12 additions and 6 deletions

9
ltm.c
View File

@@ -188,6 +188,15 @@ void luaT_trybiniTM (lua_State *L, const TValue *p1, lua_Integer i2,
}
/*
** Calls an order tag method.
** For lessequal, LUA_COMPAT_LT_LE keeps compatibility with old
** behavior: if there is no '__le', try '__lt', based on l <= r iff
** !(r < l) (assuming a total order). If the metamethod yields during
** this substitution, the continuation has to know about it (to negate
** the result of r<l); bit CIST_LEQ in the call status keeps that
** information.
*/
int luaT_callorderTM (lua_State *L, const TValue *p1, const TValue *p2,
TMS event) {
if (callbinTM(L, p1, p2, L->top, event)) /* try original event */