diff options
| -rw-r--r-- | ltm.c | 10 | ||||
| -rw-r--r-- | ltm.h | 4 |
2 files changed, 6 insertions, 8 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); |
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: ltm.h,v 2.21 2014/10/25 11:50:46 roberto Exp roberto $ | 2 | ** $Id: ltm.h,v 2.22 2016/02/26 19:20:15 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 | */ |
| @@ -64,8 +64,6 @@ LUAI_FUNC void luaT_init (lua_State *L); | |||
| 64 | 64 | ||
| 65 | LUAI_FUNC void luaT_callTM (lua_State *L, const TValue *f, const TValue *p1, | 65 | LUAI_FUNC void luaT_callTM (lua_State *L, const TValue *f, const TValue *p1, |
| 66 | const TValue *p2, TValue *p3, int hasres); | 66 | const TValue *p2, TValue *p3, int hasres); |
| 67 | LUAI_FUNC int luaT_callbinTM (lua_State *L, const TValue *p1, const TValue *p2, | ||
| 68 | StkId res, TMS event); | ||
| 69 | LUAI_FUNC void luaT_trybinTM (lua_State *L, const TValue *p1, const TValue *p2, | 67 | LUAI_FUNC void luaT_trybinTM (lua_State *L, const TValue *p1, const TValue *p2, |
| 70 | StkId res, TMS event); | 68 | StkId res, TMS event); |
| 71 | LUAI_FUNC int luaT_callorderTM (lua_State *L, const TValue *p1, | 69 | LUAI_FUNC int luaT_callorderTM (lua_State *L, const TValue *p1, |
