MCPcopy Create free account
hub / github.com/Tencent/xLua / xlua_tryget_cachedud

Function xlua_tryget_cachedud

WebGLPlugins/xlua.c:338–348  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

336}
337
338LUA_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
350static void cacheud(lua_State *L, int key, int cache_ref) {
351 lua_rawgeti(L, LUA_REGISTRYINDEX, cache_ref);

Callers

nothing calls this directly

Calls 2

lua_rawgetiFunction · 0.85
lua_removeFunction · 0.85

Tested by

no test coverage detected