RFC: getting rid of Xalloc/Xfree/... in server
Peter Hutterer
peter.hutterer at who-t.net
Sun May 9 15:58:07 PDT 2010
On Sun, May 09, 2010 at 12:21:31AM +0700, Mikhail Gusarov wrote:
>
> Twas brillig at 02:27:04 06.05.2010 UTC+07 when dottedmag at dottedmag.net did gyre and gimble:
>
> MG> There is RFC patchset which gets rid of Xalloc/Xfree/... wrappers
> MG> in X server while retaining the API and ABI.
>
> MG> URL: git://anongit.freedesktop.org/~dottedmag/xserver no-xalloc
>
> Rebased against new HEAD.
>
> Seems that everyone likes it, but nobody has sticked Reviewed-By. Hey,
> it's easy to review :)
Please send patches to the list, it'd make it a lot easier to review than
having to copy from the repo. Also, I noticed your Signed-off-by: is missing
from the commits.
commit 181bc54d4508bef43f409ff47c033d13e56b964a
Clean {X,XNF}{alloc,calloc,realloc,free,strdup} from pre-C89 baggage
Xstrdup has a Warning comment, XNFstrdup has the same comment but without
the "Warning:". Might be good to fix that up for consistency.
It might be worth adding some simple test cases to the test/ directory to
make sure these ones don't break and do what they're supposed to. I realize
that given what they do, that seems a bit over the top, so it's your call.
Change the declaration for Xrealloc for consistency.
commit 3be78ed5cbca780815cba753f47f2c4744a4edea:
Document allocation functions, noting deviations from C library
just some comment typos: "terminating the server...", "... difference from the
library function is..."
Other than that:
Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
Though I have to admit that my brain gave up halfway through the replacement
patch.
Cheers,
Peter
More information about the xorg-devel
mailing list