From 66c5fdc564dd892ed265132d6c1378dbe3cebcee Mon Sep 17 00:00:00 2001 From: chai Date: Wed, 27 Mar 2019 09:07:54 +0800 Subject: *misc --- source/3rd-party/Luax/luax_class.inl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source/3rd-party/Luax/luax_class.inl') diff --git a/source/3rd-party/Luax/luax_class.inl b/source/3rd-party/Luax/luax_class.inl index e2b8de8..7ee3de9 100644 --- a/source/3rd-party/Luax/luax_class.inl +++ b/source/3rd-party/Luax/luax_class.inl @@ -363,8 +363,8 @@ namespace Luax #if LUAX_ENABLE_NATIVE_EXTEND /// - /// 派生出子类,在lua里对派生类的成员和行为进行重新设计,但是保证了userdata的统一。Native class的派生提供Ctor支持,在 - /// native实体创建后可以使用Ctor进行初始化,派生类拥有和基类一样的New参数列表,且native对象是一样的类型。 + /// 派生出子类,在lua里对派生类的成员和行为进行重新设计,但是保证了userdata的统一。Native class的派生提供__init支持,在 + /// native实体创建后可以使用__init进行初始化,派生类拥有和基类一样的New参数列表,且native对象是一样的类型。 /// template int LuaxNativeClass::l_ExtendFactory(lua_State* L) @@ -541,8 +541,8 @@ namespace Luax int args = state.AbsIndex(-1 - n); - // 尝试调用Ctor函数 - lua_getfield(L, lua_upvalueindex(1), "Ctor"); + // 尝试调用__init函数 + lua_getfield(L, lua_upvalueindex(1), "__init"); if (state.IsType(-1, LUA_TFUNCTION)) { -- cgit v1.1-26-g67d0