aboutsummaryrefslogtreecommitdiff
path: root/ltm.c
diff options
context:
space:
mode:
Diffstat (limited to 'ltm.c')
-rw-r--r--ltm.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/ltm.c b/ltm.c
index 873c2be4..5ee123f5 100644
--- a/ltm.c
+++ b/ltm.c
@@ -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
199int 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
199void luaT_adjustvarargs (lua_State *L, Proto *p, int actual) { 213void luaT_adjustvarargs (lua_State *L, Proto *p, int actual) {
200 int i; 214 int i;
201 Table *vtab; 215 Table *vtab;