Re: constructors in tolua++
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: constructors in tolua++
- From: Peter Kümmel <syntheticpp@...>
- Date: 2005年5月07日 14:46:33 +0200
here's a fix tolua_map.c:
static void mapinheritance (lua_State* L, const char* name, const char* base)
{
/* set metatable inheritance */
luaL_getmetatable(L,name);
if (base && *base)
luaL_getmetatable(L,base);
else {
if (lua_getmetatable(L, -1)) { /* already has a mt, we don't overwrite it */
lua_pop(L, 2);
return;
};
here -> //luaL_getmetatable(L,"tolua_commonclass");
here -> luaL_getmetatable(L,name);
};
set_ubox(L);
lua_setmetatable(L,-2);
lua_pop(L,1);
}
What is the function of tolua_commonclass, do you really need it?
And why needs a metatable a metatable?
Peter