Re: Some efforts to get rid of "long" in our codebase - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Some efforts to get rid of "long" in our codebase
Date
Msg-id 1233593.1762531451@sss.pgh.pa.us
Whole thread Raw
In response to Re: Some efforts to get rid of "long" in our codebase  (Peter Eisentraut <peter@eisentraut.org>)
List pgsql-hackers
Peter Eisentraut <peter@eisentraut.org> writes:
> I do suggest some kind of comment, that we're using size_t as a 
> convenient proxy for the most suitable chunk/step size for the platform, 
> not to actually measure a size.

Yeah.  There's not actually anything wrong with using "long" here,
except that we believe that on Win64 it's probably not the processor's
native word width.  Size/size_t is more likely to match that.

([u]intptr_t is even more likely to match, but I don't think that's a
good choice because it invites confusion with the usage of uintptr_t
for address arithmetic elsewhere in the macro.  That's quite unrelated
to the choice of copy step size.)

            regards, tom lane



pgsql-hackers by date:

Previous
From: Maxim Orlov
Date:
Subject: Re: POC: make mxidoff 64 bits
Next
From: Peter Eisentraut
Date:
Subject: Re: Consistently use the XLogRecPtrIsInvalid() macro