Re: RFC:Updated VEC API

2005-04-12 Thread Mark Mitchell
Nathan Sidwell wrote: option1) Require the allocation mechanism to be mentioned in *all* vector API calls. So you'd have 'VEC_append (tree,gc,v,t)', but you'd also have 'VEC_length (tree,gc,v)', which is kind of annoying. I think that's more than annoying: it's dangerous. We'll get it wrong on

Re: RFC:Updated VEC API

2005-04-12 Thread Daniel Berlin
On Tue, 2005-04-12 at 19:42 +0100, Nathan Sidwell wrote: > Hi, > I promised to fix up the vector api, and there's a design decision > which needs to be made (incidentally, if we were in C++ land, we wouldn't > have to chose, as the right thing just happens). > Option1 is more easy to implement. Op

RFC:Updated VEC API

2005-04-12 Thread Nathan Sidwell
Hi, I promised to fix up the vector api, and there's a design decision which needs to be made (incidentally, if we were in C++ land, we wouldn't have to chose, as the right thing just happens). The old API keyed the allocation strategy off the type name. This led to the lovely typedef tree