[Top][All Lists]

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

[Bug-gnulib] Re: Patch proposal: 1-gary-safe-xfree.patch

From: Simon Josefsson
Subject: [Bug-gnulib] Re: Patch proposal: 1-gary-safe-xfree.patch
Date: Tue, 16 Sep 2003 16:14:38 +0200
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux)

"Gary V.Vaughan" <address@hidden> writes:

> If zalloc (S) === xcalloc (1, S), that would be cool.

How about zalloc (S) = calloc (1, S), and xzalloc (S) = xcalloc (1,
S), for consistency?

However, I wonder if that zalloc is a good idea; C literate, but
gnulib illiterate, people can be assumed to know about calloc(), but
not zalloc, so we would optimize away a '1,' but get less widely
understood code in exchange.  So perhaps only xzalloc makes sense, in
which case it could just as well be called zalloc like you propose.

reply via email to

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