[Python-Dev] ssize_t question: longs in header files

Tim Peters tim.peters at gmail.com
Mon May 29 19:37:08 CEST 2006


[Neal Norwitz]
>> * ints:  Include/intobject.h:    long ob_ival;

[Thomas Wouters]
> I considered asking about this before, as it would give '64-bit power' to
> Win64 integers. It's a rather big change, though (lots of code assumes
> PyInts fit in signed longs, which would be untrue then.)

I expect that "rather big" is understatement -- more that the sheer
bulk of it would make the Py_ssize_t changes look like a warmup
exercise.  Too late in the release cycle, IMO (and note that we're
still stumbling into Py_ssize_t glitches despite that it's been in
place for months).

> On the other hand, if a separate type was used for PyInts (Py_pyint_t or
> whatever, defaulting to long, except on LLP64 systems), EWT's request for a
> 64-bit integer represented by C 'long long's would be a simple configure
> switch.

But then _all_ "short ints" in Python would be 64 bits, and EWT did
not ask for a slowdown on all short int operations <0.5 wink>.


More information about the Python-Dev mailing list