This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [top-level] C++-friendly allocators for libiberty


On Sat, Jun 26, 2004 at 04:39:04AM +0200, Bernardo Innocenti wrote:
> Ian Lance Taylor wrote:
> > Bernardo Innocenti <bernie@develer.com> writes:
> > 
> > 
> >>On second thought, the interface for xrenew() or xresize() wasn't
> >>even usable without a size argument.
> > 
> > Oh yeah.
> > 
> > 
> >>Maybe this would be better?
> >>
> >>   #define xrenewvec(P, T, N)	(T *) xrealloc ((P), sizeof(T) * (N))
> > 
> > 
> > No, people use realloc with variable size arrays at the end of
> > structs.  xrenewvec (or xresizevec) is a good idea, but you still need
> > xrenew (or xresize).

Bernando, you've now got an interface which allows reallocating to a
variable size, but not allocating to one...  There's no need for a
rush, let's give people some time to comment before putting this into
libiberty.  As DJ says, it's hard to take things out of libiberty.

-- 
Daniel Jacobowitz


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]