[PATCH] array_length, array_end macros for internal use
Paul Eggert
eggert@cs.ucla.edu
Sun Oct 22 01:36:00 GMT 2017
Florian Weimer wrote:
> I didn't want to use array_size because of the potential confusion with sizeof.
Yes, that's a good reason to avoid that name.
> glibc has not followed this style for some time (see libc_hidden_def,
> __libc_lock_lock etc.), and the C++ version (if we need it) will be written as a
> function anyway.
OK, then how about the "arrayelts", or "array_elts"? "array_length" is a bit
confusion-prone, because "length" is so often one less than the number of elements.
More information about the Libc-alpha
mailing list