diff options
Diffstat (limited to 'ltm.c')
-rw-r--r-- | ltm.c | 16 |
1 files changed, 15 insertions, 1 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ltm.c,v 2.48 2017/11/08 14:50:23 roberto Exp $ | 2 | ** $Id: ltm.c,v 2.49 2017/11/23 19:18:10 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 | */ |
@@ -196,6 +196,20 @@ int luaT_callorderTM (lua_State *L, const TValue *p1, const TValue *p2, | |||
196 | } | 196 | } |
197 | 197 | ||
198 | 198 | ||
199 | int luaT_callorderiTM (lua_State *L, const TValue *p1, int v2, | ||
200 | int inv, TMS event) { | ||
201 | TValue aux; const TValue *p2; | ||
202 | setivalue(&aux, v2); | ||
203 | if (inv) { /* arguments were exchanged? */ | ||
204 | p2 = p1; p1 = &aux; /* correct them */ | ||
205 | event = (event == TM_LE) ? TM_LT : TM_LE; | ||
206 | } | ||
207 | else | ||
208 | p2 = &aux; | ||
209 | return (luaT_callorderTM(L, p1, p2, event) != inv); | ||
210 | } | ||
211 | |||
212 | |||
199 | void luaT_adjustvarargs (lua_State *L, Proto *p, int actual) { | 213 | void luaT_adjustvarargs (lua_State *L, Proto *p, int actual) { |
200 | int i; | 214 | int i; |
201 | Table *vtab; | 215 | Table *vtab; |