[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: How to pass a table as a parameter?
- From: "jose_marin2 <jose_marin2@...>" <jose_marin2@...>
- Date: Wed, 22 Jan 2003 14:33:03 -0000
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?