[Gambas-user] How do I override an Array class?
Benoît Minisini
gambas at ...1...
Mon Jun 18 14:51:57 CEST 2012
Le 18/06/2012 14:32, Emil Lenngren a écrit :
> Even if most projects don't need more than depth 16, there might be some
> very large projects (like Bruce's) that need it. Even well-designed
> projects can have a large class tree.
>
> And it is relatively easy to make that algorithm max depth-independent.
> First see at what depth the current class is at, then declare a
> variable-size array (directly on the stack, not with malloc) with the depth
> as size, then fill it with all parents.
>
> /Emil
>
>
I know, but I didn't want to use heavy allocation routines or alloca()
when I wrote that code.
But now I see that the inheritance algorithm is used only by _new and
_free, I can do that. Maybe after 3.2, as I will try to clean up that
code in the same move.
Regards,
--
Benoît Minisini
More information about the User
mailing list