[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: SIZEOF macro
From: |
Jim Meyering |
Subject: |
Re: SIZEOF macro |
Date: |
Fri, 25 Dec 2009 12:56:48 +0100 |
Jim Meyering wrote:
> Eric Blake wrote:
>> According to Eric Blake on 12/24/2009 4:21 PM:
>>> According to Bruno Haible on 12/24/2009 1:08 PM:
>>>>>> Either way we create macros.h and put ASSERT there
>>>> Done this this big commit, now.
>>>
>>> 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?
>>
>> Like this? It's also pretty quick to go with a shorter name of CARDINALITY:
>
> Good compromise.
You've all probably noticed that ARRAY_CARDINALITY is publicized
via argmatch.h. I wouldn't mind switching to a better macro name
if it came via its own -- or simply a better -- header file.
- 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 <=
- Re: SIZEOF macro, Ben Pfaff, 2009/12/24
- 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