[Patches] simple 64-bit fixes in Python/ dir

Trent Mick trentm@activestate.com
Mon, 5 Jun 2000 19:00:14 -0700


On Mon, Jun 05, 2000 at 09:30:33PM -0400, Tim Peters wrote:
> [posted & mailed]
> 
> [Trent Mick]
> > ...
> > On 64-bit platforms sizeof(int) < sizeof(size_t), so
> > using size_t avoids a downcast warning (or overflow).
> 
> I suppose we should be more careful about explaining the need for these
> changes.  For example, the claim above isn't true, as there are 64-bit
> platforms where sizeof(int) == sizeof(size_t) too (the Cray J90 is one such
> platform Python kind of <wink> runs on today, and indeed even shorts are 64
> bits on that one).
> 
> The problems here are that Python implicitly assumes sizeof(int) ==
> sizeof(size_t), because at the time Python was written size_t didn't exist
> and the long K&R tradition preceding ANSI C was that strlen returned an
> int-sized thing and malloc took one.  So they're all in the nature of
> cleaning up after the C committee a decade later <wink>.
> 
Okay, yes, I was being lazy and partially ignorant.

Trent

-- 
Trent Mick
trentm@activestate.com