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

Function lua_arith

extlibs/sol3/include/sol/sol.hpp:2521–2531  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2519"end\n";
2520
2521COMPAT53_API void lua_arith(lua_State *L, int op) {
2522 if (op < LUA_OPADD || op > LUA_OPUNM)
2523 luaL_error(L, "invalid 'op' argument for lua_arith");
2524 luaL_checkstack(L, 5, "not enough stack slots");
2525 if (op == LUA_OPUNM)
2526 lua_pushvalue(L, -1);
2527 lua_pushnumber(L, op);
2528 lua_insert(L, -3);
2529 compat53_call_lua(L, compat53_arith_code,
2530 sizeof(compat53_arith_code) - 1, 3, 1);
2531}
2532
2533static const char compat53_compare_code[] =
2534"local a,b=...\n"

Callers

nothing calls this directly

Calls 5

luaL_errorFunction · 0.85
lua_pushvalueFunction · 0.85
lua_pushnumberFunction · 0.85
compat53_call_luaFunction · 0.85
luaL_checkstackFunction · 0.70

Tested by

no test coverage detected