[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: SIZEOF macro
From: |
Ben Pfaff |
Subject: |
Re: SIZEOF macro |
Date: |
Thu, 24 Dec 2009 15:39:04 -0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) |
Eric Blake <address@hidden> writes:
> Hmm. macros.h defines SIZEOF, and test-argv-iter.c defines
> ARRAY_CARDINALITY, both of which are used to determine the size of an
> array. I kind of prefer the name in test-argv-iter (to me, sizeof implies
> a size_t count of bytes, not the number of elements). Is it okay to
> rename the macro in macros.h to ARRAY_CARDINALITY, adjust all callers, and
> to simplify test-argv-iter?
ARRAY_CARDINALITY is very clear, but it is also a very long name.
ARRAY_SIZE is perhaps slightly less clear, but much shorter. It
is used in gnulib in lib/nproc.c and lib/physmem.c.
--
Ben Pfaff
http://benpfaff.org
- Re: ASSERT and SIGNATURE_CHECK macros, (continued)
- Re: SIGNATURE_CHECK, Bruno Haible, 2009/12/24
- Re: SIGNATURE_CHECK, Eric Blake, 2009/12/24
- Re: ASSERT macro, Bruno Haible, 2009/12/24
- SIZEOF macro (was: ASSERT macro), Eric Blake, 2009/12/24
- Re: SIZEOF macro, Eric Blake, 2009/12/24
- Re: SIZEOF macro, Jim Meyering, 2009/12/25
- Re: SIZEOF macro, Jim Meyering, 2009/12/25
- Re: SIZEOF macro,
Ben Pfaff <=
- Re: SIZEOF macro, Bruno Haible, 2009/12/24
- Re: SIZEOF macro, Pádraig Brady, 2009/12/24
- Re: SIZEOF macro, Bruno Haible, 2009/12/25
- Re: SIZEOF macro, Eric Blake, 2009/12/25
- Re: SIZEOF macro, Bruno Haible, 2009/12/26
- Re: ASSERT macro, Eric Blake, 2009/12/26
- Re: ASSERT macro, Bruno Haible, 2009/12/26