MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / arith

Function arith

3rd/lua-5.4.3/src/lstrlib.c:288–294  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

286
287
288static int arith (lua_State *L, int op, const char *mtname) {
289 if (tonum(L, 1) && tonum(L, 2))
290 lua_arith(L, op); /* result will be on the top */
291 else
292 trymt(L, mtname);
293 return 1;
294}
295
296
297static int arith_add (lua_State *L) {

Callers 8

arith_addFunction · 0.85
arith_subFunction · 0.85
arith_mulFunction · 0.85
arith_modFunction · 0.85
arith_powFunction · 0.85
arith_divFunction · 0.85
arith_idivFunction · 0.85
arith_unmFunction · 0.85

Calls 3

tonumFunction · 0.85
lua_arithFunction · 0.85
trymtFunction · 0.85

Tested by

no test coverage detected