Re: pgsql: Clarify coding of .exe patch
От | Bruce Momjian |
---|---|
Тема | Re: pgsql: Clarify coding of .exe patch |
Дата | |
Msg-id | 200411010504.iA154DE15933@candle.pha.pa.us обсуждение исходный текст |
Ответ на | Re: pgsql: Clarify coding of .exe patch (Neil Conway <neilc@samurai.com>) |
Ответы |
Re: pgsql: Clarify coding of .exe patch
|
Список | pgsql-committers |
Neil Conway wrote: > On Mon, 2004-11-01 at 15:47, Bruce Momjian wrote: > > Oh, I didn't realize they had the dot in there. Let me add "-1". > > Thanks. Attached. > > I wonder if it wouldn't be cleaner to #define SIZE_OF_EXE or similar > that includes the "-1". Alternatively, we could just use strlen(): I > believe a decent compiler should be able to evaluate strlen("str") at > compile-time. 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. I have not thought of a name yet and it would be for 8.1. I count perhaps 84 places it could be used: $ rgrepc 'sizeof.*- \?1'|wc -l 84 -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073
В списке pgsql-committers по дате отправления: