lua-users home
lua-l archive

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


Yes, you are absolutely right. 

CLNumList:: CLNumList(lua_State *L)
        if (lua_isuserdata(L,1))

CLNL*t = static_cast< CLNL*>(lua_touserdata(L, 1));
real_object = new CNumList(*t->pT->real_object);

  real_object = new CNumList();


2009/10/30 Ignacio Burgueño <>
Sivan Thiruvengadam wrote:
Yes. Its being defined there.

const char CLObject::className[] = "CLObject";
Luna< CLObject >::RegType CLObject::methods[] = {
method(CLObject,  GetType),
method(CLObject,  GetListofNumbers),
method(CLObject,  Instance),

So this works:
CLObjectInstance = CLObjectI:new()

but this does not:

CLObjectInstance = CLObjectI:new()
local clnumlist1 = CLObjectInstance: GetListofNumbers()

Am I right?

If so, what does the constructor of CLNumList do? I fear it is messing with 'self'.