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]

Re: Patch for adding reconcat to libiberty



> include:
> 	* libiberty.h (reconcat): New function.
> 
> libiberty:
> 	* concat.c (reconcat): New function.

These bits are approved if...

> +/* Concatenate an arbitrary number of strings.  You must pass NULL as
> +   the last argument of this function, to terminate the list of
> +   strings.  Allocates memory using xmalloc and frees the first
> +   argument if it is non-NULL before returning.  */

I'd suggest a wording like "... using xmalloc.  The first argument is
not one of the strings to be concatenated, but if not NULL is a
pointer to be freed after the new string is created, similar to the
way xrealloc works."


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