Re: [PATCH] Change "refs/" references to symbolic constants
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Feb 19, 2007, 22:08 UTC
- Message-ID
- <Pine.LNX.4.63.0702192307240.14047@wbgn013.biozentrum.uni-wuerzburg.de>
- In-Reply-To
- <7vlkit7vy5.fsf@assigned-by-dhcp.cox.net>
Hi,
On Mon, 19 Feb 2007, Junio C Hamano wrote:
Show 10 quoted lines
> These repeated strncmp(p, X, STRLEN_X) almost makes me wonder if we want
> to introduce:
>
> inline int prefixcmp(a, b)
> {
> return (strncmp(a, b, strlen(b));
> }
>
> with clever preprocessor optimization to have compiler do strlen() when
> b is a string literal.I am in favour of that. BTW I remember that Han-Wen suggested this some time ago, too.
Ciao, Dscho