This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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


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?

Ian


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