| 2494 | } |
| 2495 | |
| 2496 | static 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 | |
| 2510 | static const char compat53_arith_code[] = |
| 2511 | "local op,a,b=...\n" |
no test coverage detected