lua-users home
lua-l archive

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


Hello!

Im trying to do this:

in Lua:

-----------

function CreateObject()
local Object = {}

function Object:DoSomething()
...
end

return Object

end

function func(obj)

obj:DoSomething()

end

theObject = CreateObject()

SetEventFunction(theObject, func)

-----------

In C, I must call "func", passing as parameter the table 
("theObject").

I know how to get the address and call func(via lua_getref), but how 
to get the address of a table, and pass it to the function call?