summaryrefslogtreecommitdiff
path: root/Runtime/Lua/LuaBind/LuaBindState.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Runtime/Lua/LuaBind/LuaBindState.cpp')
-rw-r--r--Runtime/Lua/LuaBind/LuaBindState.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/Runtime/Lua/LuaBind/LuaBindState.cpp b/Runtime/Lua/LuaBind/LuaBindState.cpp
index fa2952f..ecb8196 100644
--- a/Runtime/Lua/LuaBind/LuaBindState.cpp
+++ b/Runtime/Lua/LuaBind/LuaBindState.cpp
@@ -8,7 +8,10 @@
namespace LuaBind
{
-
+ OnRegisterClassHandler onRegisterFactoryClass;
+
+ std::string g_NameSpace = "";
+
State::State(lua_State* state)
: mState(state)
{
@@ -42,6 +45,8 @@ namespace LuaBind
void State::PushGlobalNamespace()
{
+ g_NameSpace.clear();
+
#if false
int top = GetTop();
@@ -71,6 +76,8 @@ namespace LuaBind
{
assert(IsNamespace(-1));
+ g_NameSpace += (g_NameSpace.length() > 0 ? "." : "") + (std::string)name;
+
int top = GetTop();
lua_getfield(mState, -1, name);