Re: pgsql: Clarify coding of .exe patch

Поиск
Список
Период
Сортировка
От Neil Conway
Тема Re: pgsql: Clarify coding of .exe patch
Дата
Msg-id 1099286793.17405.2.camel@localhost.localdomain
обсуждение исходный текст
Ответ на Re: pgsql: Clarify coding of .exe patch  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: pgsql: Clarify coding of .exe patch
Список 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



В списке pgsql-committers по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: pgsql: Clarify coding of .exe patch
Следующее
От: Tom Lane
Дата:
Сообщение: Re: pgsql: Clarify coding of .exe patch