[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Down-casting a C object to a Lua object
- From: Colm Sloan <colmsloan@...>
- Date: Sat, 14 Nov 2009 21:17:56 +0000
In short, does anyone know the Lua equivalent of the C++ code:
DerivedClass d = (DerivedClass)baseClass;
But only using Lua code, no C++.
The base class object already has loads of things in it that I need in the derived class. I don't believe I can just use table.copy(t) because I don't think that gets everything. I've been stuck on this for days trying a variety of approaches. Any ideas?