| 456 | } |
| 457 | |
| 458 | int32 FLuaEnv::FindOrAddThread(lua_State* Thread) |
| 459 | { |
| 460 | int32 ThreadRef = FindThread(Thread); |
| 461 | if (ThreadRef == LUA_REFNIL) |
| 462 | { |
| 463 | int32 Value = lua_pushthread(Thread); |
| 464 | if (Value == 1) |
| 465 | { |
| 466 | lua_pop(Thread, 1); |
| 467 | return LUA_REFNIL; |
| 468 | } |
| 469 | |
| 470 | ThreadRef = luaL_ref(Thread, LUA_REGISTRYINDEX); |
| 471 | AddThread(Thread, ThreadRef); |
| 472 | } |
| 473 | return ThreadRef; |
| 474 | } |
| 475 | |
| 476 | lua_Alloc FLuaEnv::GetLuaAllocator() const |
| 477 | { |
no test coverage detected