Re: [PATCH] Change "refs/" references to symbolic constants
- From
Shawn O. Pearce <spearce@spearce.org>
- Date
- Feb 19, 2007, 20:56 UTC
- Message-ID
- <20070219205647.GB27722@spearce.org>
- In-Reply-To
- <m3fy91q3bq.fsf@maximus.localdomain>
Krzysztof Halasa <khc@pm.waw.pl> wrote:
Show 9 quoted lines
> Bill Lear <rael@zopyra.com> writes: > > > Would this be less error-prone, and just as efficient?: > > > > #define PATH_REMOTES "remotes/" > > #define LIT_STRLEN(S) ((sizeof(S) / sizeof(S[0])) -1) > > #define STRLEN_PATH_REMOTES LIT_STRLEN(PATH_REMOTES) > > sizeof(char) is always 1.
Except when someone does something silly, like say:
#define char double
:-)
-- Shawn.