RFC: getting rid of Xalloc/Xfree/... in server

Peter Hutterer peter.hutterer at who-t.net
Mon May 10 00:01:28 PDT 2010


On Mon, May 10, 2010 at 01:51:35PM +0700, Mikhail Gusarov wrote:
> 
> Twas brillig at 08:58:07 10.05.2010 UTC+10 when peter.hutterer at who-t.net did gyre and gimble:
> 
>  PH> Please send patches to the list, it'd make it a lot easier to
>  PH> review than having to copy from the repo.
> 
> [/me notes: X server patches to list, libraries usually reviewed by Alan
> - as pull request] Actually the sheer size of rename patch was what held
> me from doing it in first place.
> 
>  PH> Also, I noticed your Signed-off-by: is missing from the commits.
> 
> Fixed.
> 
>  PH> commit 181bc54d4508bef43f409ff47c033d13e56b964a
>  PH>     Clean {X,XNF}{alloc,calloc,realloc,free,strdup} from pre-C89 baggage
> 
>  PH> Xstrdup has a Warning comment, XNFstrdup has the same comment but
>  PH> without the "Warning:". Might be good to fix that up for
>  PH> consistency.
> 
> There are comments added to header in the later patch, so I decided to
> remove both from .c. Anyway it's the documentation about what functions
> do, not how they are implemented.
> 
>  PH> It might be worth adding some simple test cases to the test/
>  PH> directory to make sure these ones don't break and do what they're
>  PH> supposed to. I realize that given what they do, that seems a bit
>  PH> over the top, so it's your call.
> 
> Yeah, those are _too_ simple, and description was extracted from
> existing implementation, not from careful review of callers.
> 
>  PH> Change the declaration for Xrealloc for consistency.
> 
> Uhm, what exactly do you mean? I don't see any inconsistency.

declaration still has pointer, implementation has void*, right?
same for XNFrealloc. again, not that it matters, but..

Cheers,
  Peter


More information about the xorg-devel mailing list