| 3010 | } |
| 3011 | |
| 3012 | static 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 | |
| 3025 | static const char compat53_arith_code[] |
| 3026 | = "local op,a,b=...\n" |
no test coverage detected