| 336 | } |
| 337 | |
| 338 | LUA_API int xlua_tryget_cachedud(lua_State *L, int key, int cache_ref) { |
| 339 | lua_rawgeti(L, LUA_REGISTRYINDEX, cache_ref); |
| 340 | lua_rawgeti(L, -1, key); |
| 341 | if (!lua_isnil(L, -1)) |
| 342 | { |
| 343 | lua_remove(L, -2); |
| 344 | return 1; |
| 345 | } |
| 346 | lua_pop(L, 2); |
| 347 | return 0; |
| 348 | } |
| 349 | |
| 350 | static void cacheud(lua_State *L, int key, int cache_ref) { |
| 351 | lua_rawgeti(L, LUA_REGISTRYINDEX, cache_ref); |
nothing calls this directly
no test coverage detected