Re: pgsql: Clarify coding of .exe patch

From: Neil Conway <neilc(at)samurai(dot)com>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: pgsql-committers(at)postgresql(dot)org, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: pgsql: Clarify coding of .exe patch
Date: 2004-11-01 05:26:33
Message-ID: 1099286793.17405.2.camel@localhost.localdomain
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

On Mon, 2004-11-01 at 16:04, Bruce Momjian wrote:
> I prefer strlen() myself but Tom prefers sizeof(). In the long run I
> would like to create a 'sizeof' that doesn't include the null as a
> global define that we can use for any hard-coded string.

Tom, can you elaborate on why you prefer sizeof()? ISTM that a decent
compiler will evaluate the strlen() at compile-time if the argument is a
compile-time constant. GCC will do this (even at -O0!), for example.

-Neil

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2004-11-01 05:47:49 Re: pgsql: Clarify coding of .exe patch
Previous Message Bruce Momjian 2004-11-01 05:06:57 Re: pgsql: Clarify coding of .exe patch