MaxInt on Vista-64bit?

"Martin v. Löwis" martin at v.loewis.de
Sat Jan 24 15:06:39 EST 2009


> I downloaded Python64 for Windows Vista64 but the value returned from
> sys.maxint is just a 32bit integer. I found out, thats by design,
> Microsoft decided to make the long value 32bit. What can I do to
> compile python 2.6 with maxint of 64bit integers?

At a minimum, you need to change ob_ival to a 64-bit type in
PyIntObject. Consequentially, you probably need to change a lot
of other functions, e.g. PyInt_AsLong should probably also return
a 64-bit integer (as should PyInt_FromLong accept one). In turn,
you will need to change all callers of these functions to adjust
their parameter types. And so on.

> Can I replace the int values to a int64 value?

See above. In short: no. Use a real 64-bit operating system
(such as 64-bit Linux, Solaris, FreeBSD, etc)

Regards,
Martin

P.S. I do wonder why you want to do this, though. Isn't Python's
long integer type good enough?



More information about the Python-list mailing list