diff options
Diffstat (limited to 'Runtime/Scripting/LuaBindVM.h')
-rw-r--r-- | Runtime/Scripting/LuaBindVM.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/Runtime/Scripting/LuaBindVM.h b/Runtime/Scripting/LuaBindVM.h index dcff44f..287f906 100644 --- a/Runtime/Scripting/LuaBindVM.h +++ b/Runtime/Scripting/LuaBindVM.h @@ -15,18 +15,18 @@ namespace LuaBind /// /// 单个lua_state相关的context。是一系列代理的集合,拷贝也没关系,主要是为了节约内存。 /// - class LuaBindVM + class VM { public: /// /// 根据global_State拿到虚拟机。 /// - static LuaBindVM* TryGetVM(global_State* gState); - static LuaBindVM* TryGetVM(lua_State* state); + static VM* TryGetVM(global_State* gState); + static VM* TryGetVM(lua_State* state); - LuaBindVM(); - ~LuaBindVM(); + VM(); + ~VM(); /// /// 创建虚拟机后,需要手动调用Setup函数,初始化一些虚拟机状态。 @@ -35,19 +35,19 @@ namespace LuaBind lua_State* GetMainThread(); lua_State* CreateThread(); - LuaBindState GetMainState(); + State GetMainState(); - LuaBindRefTable& GetStrongRefTable(); - LuaBindRefTable& GetWeakRefTable(); + RefTable& GetStrongRefTable(); + RefTable& GetWeakRefTable(); private: - typedef std::map<global_State*, LuaBindVM*> VMap; + typedef std::map<global_State*, VM*> VMap; static VMap VMs; // 通过global_State索引虚拟机,为了方便 - LuaBindRefTable mStrongRefTable; // _LUA_BIND_STRONGREF_TABLE - LuaBindRefTable mWeakRefTable; // _LUA_BIND_WEAKREF_TABLE + RefTable mStrongRefTable; // _LUA_BIND_STRONGREF_TABLE + RefTable mWeakRefTable; // _LUA_BIND_WEAKREF_TABLE global_State* mGlobalState; // 虚拟机的global_State,由当前虚拟机的所有线程共享 lua_State* mMainThread; // 主线程 |