diff options
Diffstat (limited to 'ltm.c')
-rw-r--r-- | ltm.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ltm.c,v 2.38 2016/12/22 13:08:50 roberto Exp roberto $ | 2 | ** $Id: ltm.c,v 2.39 2017/04/11 18:41:09 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 | */ |
@@ -121,8 +121,8 @@ void luaT_callTM (lua_State *L, const TValue *f, const TValue *p1, | |||
121 | } | 121 | } |
122 | 122 | ||
123 | 123 | ||
124 | int luaT_callbinTM (lua_State *L, const TValue *p1, const TValue *p2, | 124 | static int callbinTM (lua_State *L, const TValue *p1, const TValue *p2, |
125 | StkId res, TMS event) { | 125 | StkId res, TMS event) { |
126 | const TValue *tm = luaT_gettmbyobj(L, p1, event); /* try first operand */ | 126 | const TValue *tm = luaT_gettmbyobj(L, p1, event); /* try first operand */ |
127 | if (ttisnil(tm)) | 127 | if (ttisnil(tm)) |
128 | tm = luaT_gettmbyobj(L, p2, event); /* try second operand */ | 128 | tm = luaT_gettmbyobj(L, p2, event); /* try second operand */ |
@@ -134,7 +134,7 @@ int luaT_callbinTM (lua_State *L, const TValue *p1, const TValue *p2, | |||
134 | 134 | ||
135 | void luaT_trybinTM (lua_State *L, const TValue *p1, const TValue *p2, | 135 | void luaT_trybinTM (lua_State *L, const TValue *p1, const TValue *p2, |
136 | StkId res, TMS event) { | 136 | StkId res, TMS event) { |
137 | if (!luaT_callbinTM(L, p1, p2, res, event)) { | 137 | if (!callbinTM(L, p1, p2, res, event)) { |
138 | switch (event) { | 138 | switch (event) { |
139 | case TM_CONCAT: | 139 | case TM_CONCAT: |
140 | luaG_concaterror(L, p1, p2); | 140 | luaG_concaterror(L, p1, p2); |
@@ -157,7 +157,7 @@ void luaT_trybinTM (lua_State *L, const TValue *p1, const TValue *p2, | |||
157 | 157 | ||
158 | int luaT_callorderTM (lua_State *L, const TValue *p1, const TValue *p2, | 158 | int luaT_callorderTM (lua_State *L, const TValue *p1, const TValue *p2, |
159 | TMS event) { | 159 | TMS event) { |
160 | if (!luaT_callbinTM(L, p1, p2, L->top, event)) | 160 | if (!callbinTM(L, p1, p2, L->top, event)) |
161 | return -1; /* no metamethod */ | 161 | return -1; /* no metamethod */ |
162 | else | 162 | else |
163 | return !l_isfalse(L->top); | 163 | return !l_isfalse(L->top); |