MCPcopy Create free account
hub / github.com/Tencent/UnLua / RemoveCachedScriptContainer

Function RemoveCachedScriptContainer

Plugins/UnLua/Source/UnLua/Private/LuaCore.cpp:553–570  ·  view source on GitHub ↗

* Remove a cached script container from 'ScriptContainerMap' */

Source from the content-addressed store, hash-verified

551 * Remove a cached script container from 'ScriptContainerMap'
552 */
553void RemoveCachedScriptContainer(lua_State *L, void *Key)
554{
555 if (!L || !Key)
556 {
557 return;
558 }
559
560 lua_getfield(L, LUA_REGISTRYINDEX, "ScriptContainerMap");
561 lua_pushlightuserdata(L, Key);
562 int32 Type = lua_rawget(L, -2);
563 if (Type != LUA_TNIL)
564 {
565 lua_pushlightuserdata(L, Key);
566 lua_pushnil(L);
567 lua_rawset(L, -4);
568 }
569 lua_pop(L, 2);
570}
571
572/**
573 * Push a UObject to Lua stack

Callers 1

RemoveMethod · 0.85

Calls 5

lua_getfieldFunction · 0.85
lua_pushlightuserdataFunction · 0.85
lua_rawgetFunction · 0.85
lua_pushnilFunction · 0.85
lua_rawsetFunction · 0.85

Tested by

no test coverage detected