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

Function compat53_call_lua

Libs/sol/sol.hpp:3012–3023  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3010}
3011
3012static void compat53_call_lua(lua_State* L, char const code[], size_t len, int nargs, int nret) {
3013 lua_rawgetp(L, LUA_REGISTRYINDEX, (void*)code);
3014 if (lua_type(L, -1) != LUA_TFUNCTION) {
3015 lua_pop(L, 1);
3016 if (luaL_loadbuffer(L, code, len, "=none"))
3017 lua_error(L);
3018 lua_pushvalue(L, -1);
3019 lua_rawsetp(L, LUA_REGISTRYINDEX, (void*)code);
3020 }
3021 lua_insert(L, -nargs - 1);
3022 lua_call(L, nargs, nret);
3023}
3024
3025static const char compat53_arith_code[]
3026 = "local op,a,b=...\n"

Callers 2

lua_arithFunction · 0.85
lua_compareFunction · 0.85

Calls 2

lua_rawgetpFunction · 0.85
lua_rawsetpFunction · 0.85

Tested by

no test coverage detected