[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: realloc documentation

From: Simon Josefsson
Subject: Re: realloc documentation
Date: Tue, 21 Apr 2009 13:07:37 +0200
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.90 (gnu/linux)

Bruno Haible <address@hidden> writes:

> Simon Josefsson wrote:
>> What about a realloc-gnu which implements a behaviour we think it is
>> useful?  I know that we used -gnu for modules that are glibc extensions
>> over POSIX
> Yes, the two standards to which gnulib leans are POSIX and glibc's behaviour.
>> but I think we could extend it to be just any extension over 
>> POSIX.  Alternatively, use realloc-gnulib?
> Then we can call it zrealloc or wrealloc or like that. It's better to use
> a different name when we create a function which is an invention of our own;
> otherwise users get confused.

Right, I agree.

> Now, regarding realloc specifically, what is the significant extension of
> POSIX that you would propose that makes it worth documenting for us and
> worth reading this documentation for the user? I think you will end up
> with either 'xrealloc' or 'REALLOC-N' from the safe-alloc module...

I agree.  Or even, use realloc as if it were POSIX.  It's not that
complicated, is it?  That seems more robust anyway.  People reading code
that uses realloc and the code assumes non-POSIX behaviour are going to
be surprised if gnulib does anything extra here.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]