summaryrefslogtreecommitdiff
path: root/Runtime/Lua/LuaBind/LuaBindState.h
diff options
context:
space:
mode:
Diffstat (limited to 'Runtime/Lua/LuaBind/LuaBindState.h')
-rw-r--r--Runtime/Lua/LuaBind/LuaBindState.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/Runtime/Lua/LuaBind/LuaBindState.h b/Runtime/Lua/LuaBind/LuaBindState.h
index ec2a350..9028583 100644
--- a/Runtime/Lua/LuaBind/LuaBindState.h
+++ b/Runtime/Lua/LuaBind/LuaBindState.h
@@ -286,10 +286,13 @@ namespace LuaBind
TYPE::RegisterFactoryClass(state);
TYPE::RegisterClass(state);
- // 自定义流程
+ // 自定义注册内容
if (onRegisterFactoryClass)
onRegisterFactoryClass(state, clsIdx, type, g_NameSpace);
+ // 清理栈
+ lua_settop(state, clsIdx);
+
// 检测TYPE里面是否没有注册必须的方法
#define _assertmethod(I, NAME) \
GetField(I, NAME); \