From 1ab2501db0f9e14f138292880e37120e7a6184de Mon Sep 17 00:00:00 2001 From: chai Date: Sat, 16 Mar 2019 13:03:50 +0800 Subject: *luax --- Source/3rdParty/Luax/luax_runtime.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'Source/3rdParty/Luax/luax_runtime.cpp') diff --git a/Source/3rdParty/Luax/luax_runtime.cpp b/Source/3rdParty/Luax/luax_runtime.cpp index 47b20cb..b45d36a 100644 --- a/Source/3rdParty/Luax/luax_runtime.cpp +++ b/Source/3rdParty/Luax/luax_runtime.cpp @@ -26,9 +26,9 @@ namespace Luax lua_State* L = lua_open(); assert(L); - // 1. 加入 - mContexts.insert(pair(L, Context(L))); - // 2. 初始化context + // 1) 加入 + mContexts.insert(pair(L, LuaxContext(L))); + // 2) 初始化context (*this)[L].Setup(); return L; @@ -36,7 +36,7 @@ namespace Luax void LuaxRuntime::Close(lua_State* L) { - map::iterator it = mContexts.find(L); + map::iterator it = mContexts.find(L); if (it != mContexts.end()) { lua_close(it->second.state); @@ -46,13 +46,13 @@ namespace Luax bool LuaxRuntime::HasLuaxState(lua_State* L) { - map::iterator it = mContexts.find(L); + map::iterator it = mContexts.find(L); return it != mContexts.end(); } LuaxState& LuaxRuntime::GetLuaxState(lua_State* L) { - map::iterator it = mContexts.find(L); + map::iterator it = mContexts.find(L); if (it != mContexts.end()) { return it->second.state; @@ -61,7 +61,7 @@ namespace Luax LuaxRefTable& LuaxRuntime::GetStrongRefTable(lua_State* L) { - map::iterator it = mContexts.find(L); + map::iterator it = mContexts.find(L); if (it != mContexts.end()) { return it->second.strongRefTable; @@ -70,16 +70,16 @@ namespace Luax LuaxRefTable& LuaxRuntime::GetWeaksRefTable(lua_State* L) { - map::iterator it = mContexts.find(L); + map::iterator it = mContexts.find(L); if (it != mContexts.end()) { return it->second.weakRefTable; } } - Context& LuaxRuntime::operator[](lua_State* L) + LuaxContext& LuaxRuntime::operator[](lua_State* L) { - map::iterator it = mContexts.find(L); + map::iterator it = mContexts.find(L); assert(it != mContexts.end()); return it->second; } -- cgit v1.1-26-g67d0