MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / luaT_trybinTM

Function luaT_trybinTM

third-party/lua-5.5.0/src/ltm.c:150–166  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 3

luaV_executeFunction · 0.70
luaT_trybinassocTMFunction · 0.70
luaO_arithFunction · 0.70

Calls 3

callbinTMFunction · 0.70
luaG_tointerrorFunction · 0.70
luaG_opinterrorFunction · 0.70

Tested by

no test coverage detected