Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Bernardo Innocenti <bernie@develer.com>
To: Ian Lance Taylor <ian@wasabisystems.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>,
	 gdb-patches@sources.redhat.com,  binutils@sources.redhat.com,
	 DJ Delorie <dj@redhat.com>
Subject: Re: [top-level] C++-friendly allocators for libiberty
Date: Sat, 26 Jun 2004 01:27:00 -0000	[thread overview]
Message-ID: <40DCD0EE.9010208@develer.com> (raw)
In-Reply-To: <m3659fm87e.fsf@gossamer.airs.com>

Ian Lance Taylor wrote:
> Bernardo Innocenti <bernie@develer.com> writes:
> 
> 
>>2004-06-26  Bernardo Innocenti  <bernie@develer.com>
>>
>>	* include/libiberty.h (xnew, xcnew, xnewvec, xcnewvec, xobnew): Move
>>	here from libcpp/internal.h.
>>	(xcrealloc, xdelete, xdeletevec): New macros.
>>
>>libcpp:
>>
>>2004-06-26  Bernardo Innocenti  <bernie@develer.com>
>>
>>	* internal.h (xnew, xcnew, xnewvec, xcnewvec, xobnew): Move these
>>	macros to include/libiberty.h.
> 
> 
> The libiberty part is fine except for xcrealloc.  That name clearly
> shouldn't have a 'c' in it.  Also, it doesn't seem to fit the general
> copying of C++ names.  In C++ there isn't realloc to correpond to new
> and delete.  Still, I suppose C needs realloc.  But we can't use
> xrealloc, because that is taken.  So how about xresize?

On second thought, the interface for xrenew() or xresize() wasn't
even usable without a size argument.

Maybe this would be better?

   #define xrenewvec(P, T, N)	(T *) xrealloc ((P), sizeof(T) * (N))

-- 
  // Bernardo Innocenti - Develer S.r.l., R&D dept.
\X/  http://www.develer.com/


  reply	other threads:[~2004-06-26  1:27 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-26  0:50 Bernardo Innocenti
2004-06-26  1:05 ` Bernardo Innocenti
2004-06-26  1:14 ` Ian Lance Taylor
2004-06-26  1:27   ` Bernardo Innocenti [this message]
2004-06-26  2:19     ` Ian Lance Taylor
2004-06-26  2:39       ` Bernardo Innocenti
2004-06-26  2:46         ` Daniel Jacobowitz
2004-06-26  3:04           ` Bernardo Innocenti
2004-06-26 17:22           ` Andrew Cagney
2004-06-26 17:37             ` Daniel Jacobowitz
2004-06-26 17:51               ` Andrew Cagney
2004-06-27  5:36             ` Bernardo Innocenti
2004-06-28 15:43               ` Andrew Cagney
2004-06-28 18:27                 ` Bernardo Innocenti
2004-06-28 18:52                   ` Joseph S. Myers
2004-07-01  7:18                   ` Bernardo Innocenti
2004-06-26  3:45         ` Alexandre Oliva
2004-06-26  4:18           ` Bernardo Innocenti
2004-06-26 18:31             ` Alexandre Oliva
2004-06-27  5:05               ` Bernardo Innocenti
2004-06-26  4:56           ` Zack Weinberg
2004-06-26 11:19             ` Falk Hueffner
2004-06-26 16:52               ` Bernardo Innocenti

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=40DCD0EE.9010208@develer.com \
    --to=bernie@develer.com \
    --cc=binutils@sources.redhat.com \
    --cc=dj@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=gdb-patches@sources.redhat.com \
    --cc=ian@wasabisystems.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox