* Remove a cached script container from 'ScriptContainerMap' */
| 551 | * Remove a cached script container from 'ScriptContainerMap' |
| 552 | */ |
| 553 | void 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 |
no test coverage detected