From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31976 invoked by alias); 26 Jun 2004 02:46:24 -0000 Mailing-List: contact binutils-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sources.redhat.com Received: (qmail 31935 invoked from network); 26 Jun 2004 02:46:22 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sourceware.org with SMTP; 26 Jun 2004 02:46:22 -0000 Received: from drow by nevyn.them.org with local (Exim 4.34 #1 (Debian)) id 1Be3Cs-0008G5-8w; Fri, 25 Jun 2004 22:46:18 -0400 Date: Sat, 26 Jun 2004 02:46:00 -0000 From: Daniel Jacobowitz To: Bernardo Innocenti Cc: Ian Lance Taylor , GCC Patches , gdb-patches@sources.redhat.com, binutils@sources.redhat.com, DJ Delorie Subject: Re: [top-level] C++-friendly allocators for libiberty Message-ID: <20040626024617.GA31620@nevyn.them.org> Mail-Followup-To: Bernardo Innocenti , Ian Lance Taylor , GCC Patches , gdb-patches@sources.redhat.com, binutils@sources.redhat.com, DJ Delorie References: <40DCC86A.4010306@develer.com> <40DCD0EE.9010208@develer.com> <40DCE1C8.4020202@develer.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <40DCE1C8.4020202@develer.com> User-Agent: Mutt/1.5.5.1+cvs20040105i X-SW-Source: 2004-06/txt/msg00462.txt.bz2 On Sat, Jun 26, 2004 at 04:39:04AM +0200, Bernardo Innocenti wrote: > Ian Lance Taylor wrote: > > Bernardo Innocenti 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