MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / luaT_trybinTM

Function luaT_trybinTM

extlibs/lua/src/ltm.c:148–164  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

146
147
148void luaT_trybinTM (lua_State *L, const TValue *p1, const TValue *p2,
149 StkId res, TMS event) {
150 if (!callbinTM(L, p1, p2, res, event)) {
151 switch (event) {
152 case TM_BAND: case TM_BOR: case TM_BXOR:
153 case TM_SHL: case TM_SHR: case TM_BNOT: {
154 if (ttisnumber(p1) && ttisnumber(p2))
155 luaG_tointerror(L, p1, p2);
156 else
157 luaG_opinterror(L, p1, p2, "perform bitwise operation on");
158 }
159 /* calls never return, but to avoid warnings: *//* FALLTHROUGH */
160 default:
161 luaG_opinterror(L, p1, p2, "perform arithmetic on");
162 }
163 }
164}
165
166
167void luaT_tryconcatTM (lua_State *L) {

Callers 3

luaV_executeFunction · 0.85
luaT_trybinassocTMFunction · 0.85
luaO_arithFunction · 0.85

Calls 3

callbinTMFunction · 0.85
luaG_tointerrorFunction · 0.85
luaG_opinterrorFunction · 0.85

Tested by

no test coverage detected