[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Down-casting a C object to a Lua object
- From: Peter Cawley <lua@...>
- Date: Sat, 14 Nov 2009 21:32:02 +0000
Lua doesn't have any class or inheritance system built in, so it'll be
hard to give an answer without first knowing what implementation of a
class system you are using.
On Sat, Nov 14, 2009 at 9:17 PM, Colm Sloan <firstname.lastname@example.org> wrote:
> 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?
> Thanks :)