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

Function compat53_call_lua

extlibs/sol3/include/sol/sol.hpp:2496–2508  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2494}
2495
2496static void compat53_call_lua(lua_State *L, char const code[], size_t len,
2497 int nargs, int nret) {
2498 lua_rawgetp(L, LUA_REGISTRYINDEX, (void*)code);
2499 if (lua_type(L, -1) != LUA_TFUNCTION) {
2500 lua_pop(L, 1);
2501 if (luaL_loadbuffer(L, code, len, "=none"))
2502 lua_error(L);
2503 lua_pushvalue(L, -1);
2504 lua_rawsetp(L, LUA_REGISTRYINDEX, (void*)code);
2505 }
2506 lua_insert(L, -nargs - 1);
2507 lua_call(L, nargs, nret);
2508}
2509
2510static const char compat53_arith_code[] =
2511"local op,a,b=...\n"

Callers 2

lua_arithFunction · 0.85
lua_compareFunction · 0.85

Calls 5

lua_typeFunction · 0.85
lua_errorFunction · 0.85
lua_pushvalueFunction · 0.85
lua_rawgetpFunction · 0.70
lua_rawsetpFunction · 0.70

Tested by

no test coverage detected