Re: Inheriting from C++ Classes
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: Inheriting from C++ Classes
- From: Leo Razoumov <slonik.az@...>
- Date: 2009年1月23日 09:07:24 -0500 (EST)
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--