lua-users home
lua-l archive

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


This is exactly why Lua has userdata.
There are some examples on the wiki:
 http://lua-users.org/wiki/CallingLuaFromCpp

- Peter Shook

Roger D. Vargas wrote:
I need to pass a pointer to a class to a lua script, and get it back from a C function called from that script that access methods in that class. As lua manages numbers as float sometimes, I was thinking if this would corrupt the value of the pointer. Is possible to do this? There is some more adequate way to do it?