You don't need to call alloca(). Simply use something like this:
CLASS *her[get_the_size()];

It is valid in C99.

2012/6/18 Benoît Minisini <gam...@users.sourceforge.net>

> 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
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to