lua-users home
lua-l archive

Re: Inheriting from C++ Classes

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On 2009年1月23日, Ignacio Burgueño wrote:
[..snip..]
lcbBaseObject.h contains a lot of stuff you won't need at all. Is just there for the RegType struct, so you can rip this:
 typedef struct { T* pT; } userdataType;
	typedef int (T::*mfp)(lua_State* L);
	typedef struct {
		const char* name;
		mfp mfunc;
	} RegType;
and paste it somewhere else.
What is the purpose of
typedef int (T::*mfp)(lua_State* L);
Type mpf refers to a C++ member function of class T and cannot be made into Lua C-closure because it implicitly passes this-pointer as an extra argument.
--Leo--

AltStyle によって変換されたページ (->オリジナル) /