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

Function lua_arith

Libs/sol/sol.hpp:3036–3045  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3034 "end\n";
3035
3036COMPAT53_API void lua_arith(lua_State* L, int op) {
3037 if (op < LUA_OPADD || op > LUA_OPUNM)
3038 luaL_error(L, "invalid 'op' argument for lua_arith");
3039 luaL_checkstack(L, 5, "not enough stack slots");
3040 if (op == LUA_OPUNM)
3041 lua_pushvalue(L, -1);
3042 lua_pushnumber(L, op);
3043 lua_insert(L, -3);
3044 compat53_call_lua(L, compat53_arith_code, sizeof(compat53_arith_code) - 1, 3, 1);
3045}
3046
3047static const char compat53_compare_code[]
3048 = "local a,b=...\n"

Callers

nothing calls this directly

Calls 2

luaL_checkstackFunction · 0.85
compat53_call_luaFunction · 0.85

Tested by

no test coverage detected