[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: SIZEOF macro
From: |
Eric Blake |
Subject: |
Re: SIZEOF macro |
Date: |
Fri, 25 Dec 2009 16:14:15 -0700 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
According to Bruno Haible on 12/25/2009 3:58 AM:
> Pádraig Brady wrote:
>> I use LENGTHOF in my personal code.
>
> It's certainly handy and easy to remember. But in C we often make the
> distinction between "length" (= number of elements that matter) and
> "size" (= number of elements for which room is allocated).
> The array L"abc" has length 3, as determined by wcslen, but has storage
> allocated for 4 elements.
Is there some other short but acceptable name? Maybe COUNTOF or
ARRAY_COUNT? END_INDEX or LAST_INDEX?
- --
Don't work too hard, make some time for fun as well!
Eric Blake address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAks1R0cACgkQ84KuGfSFAYA9jwCcC0dvyLKr76fVzDIA1Z+GAp87
/lkAnA++8JG9HiAnlHanfEufq+Rd03ry
=ZSuu
-----END PGP SIGNATURE-----
- Re: SIGNATURE_CHECK, (continued)
- 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, 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 <=
- Re: SIZEOF macro, Bruno Haible, 2009/12/26
- Re: ASSERT macro, Eric Blake, 2009/12/26
- Re: ASSERT macro, Bruno Haible, 2009/12/26