summaryrefslogtreecommitdiff
path: root/source/3rd-party/Luax/luax_class.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/3rd-party/Luax/luax_class.cpp')
-rw-r--r--source/3rd-party/Luax/luax_class.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/source/3rd-party/Luax/luax_class.cpp b/source/3rd-party/Luax/luax_class.cpp
index e2019d4..9f316c1 100644
--- a/source/3rd-party/Luax/luax_class.cpp
+++ b/source/3rd-party/Luax/luax_class.cpp
@@ -73,7 +73,7 @@ namespace Luax
}
///
- /// NewnԻȡCtorCtorʼʵ
+ /// NewnԻȡ__init__initʼʵ
///
int LuaxPlainClass::l_New(lua_State* L)
{
@@ -95,11 +95,11 @@ namespace Luax
lua_setmetatable(L, -2);
// ҵ캯ᴥmetatable.__index,ݼ̳ҡ
- lua_getfield(L, classTable, "Ctor");
+ lua_getfield(L, classTable, "__init");
if (state.IsType(-1, LUA_TFUNCTION))
{
// stack:
- // -1: Ctor()
+ // -1: __init()
// -2: instance
// -3~-n-2: params
@@ -107,27 +107,27 @@ namespace Luax
// stack:
// -1: instance
// -2~-n-1: params
- // -n-2: Ctor()
+ // -n-2: __init()
lua_pushvalue(L, -1);
// stack:
// -1: instance
// -2: instance
// -3~-n-2: params
- // -n-3: Ctor
+ // -n-3: __init
lua_insert(L, -3 - n);
// stack:
// -1: instance
// -2~-n-1: params
- // -n-2: Ctor()
+ // -n-2: __init()
// -n-3: instance
lua_insert(L, -1 - n);
// stack:
// -1~-n: params
// -n-1: instance
- // -n-2: Ctor()
+ // -n-2: __init()
// -n-3: instance
lua_pcall(L, n + 1, 0, 0);