| 2426 | } |
| 2427 | |
| 2428 | static void compat53_call_lua(lua_State *L, char const code[], size_t len, |
| 2429 | int nargs, int nret) { |
| 2430 | lua_rawgetp(L, LUA_REGISTRYINDEX, (void*)code); |
| 2431 | if (lua_type(L, -1) != LUA_TFUNCTION) { |
| 2432 | lua_pop(L, 1); |
| 2433 | if (luaL_loadbuffer(L, code, len, "=none")) |
| 2434 | lua_error(L); |
| 2435 | lua_pushvalue(L, -1); |
| 2436 | lua_rawsetp(L, LUA_REGISTRYINDEX, (void*)code); |
| 2437 | } |
| 2438 | lua_insert(L, -nargs - 1); |
| 2439 | lua_call(L, nargs, nret); |
| 2440 | } |
| 2441 | |
| 2442 | static const char compat53_arith_code[] = |
| 2443 | "local op,a,b=...\n" |
no test coverage detected