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.hpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'source/3rd-party/Luax/luax_class.hpp') diff --git a/source/3rd-party/Luax/luax_class.hpp b/source/3rd-party/Luax/luax_class.hpp index 3d7ede6..af52b5f 100644 --- a/source/3rd-party/Luax/luax_class.hpp +++ b/source/3rd-party/Luax/luax_class.hpp @@ -11,8 +11,6 @@ namespace Luax { -#define LUAX_DECL_METHOD(mtd) static int mtd(lua_State* L) - /// /// RegisterLuaxClass 注册类的方法和成员,比如枚举、常量等到class table /// LuaxGetFactoryName 获得工厂的类名,同时用来避免注册时错误注册为了singleton,通过编译时报错避免 @@ -35,6 +33,10 @@ namespace Luax static const char* GetLuaxClassName() { return #type; }; \ static bool IsLuaxClassSingleton() { return true; }; +#define LUAX_DECL_METHOD(mtd) static int mtd(lua_State* L) + +#define LUAX_DECL_ENUM(e) + /// /// 标明方法实现的宏。上下文里有一个L。 /// @@ -106,6 +108,7 @@ namespace Luax /// /// 将userdata push到栈顶,如果没有初始化mUserdata,初始化设置好元表并把初始化好的userdata留在栈顶。并添加一个引用。 + /// 这是一个将native对象所有权移交给lua控制的方法。 /// bool PushLuaxUserdata(LuaxState& state); bool PushLuaxMemberTable(LuaxState& state); -- cgit v1.1-26-g67d0