[Python-Dev] 64 bit warnings (original) (raw)
"Martin v. Löwis" martin at v.loewis.de
Thu May 3 00:12:10 CEST 2007
- Previous message: [Python-Dev] 64 bit warnings
- Next message: [Python-Dev] PEP 30XZ: Simplified Parsing
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Any thoughts?
These should be fixed on a case-by-case basis. Please submit patches to SF, and assign them to me. Changes should only go into 2.6.
As a principle, values that could exceed 2Gi in a hand-crafted Python program should be Py_ssize_t. Values that can never exceed the int range (because of other constraints, such as limitations of the byte code) should be safe-downcast to int (or smaller).
In the particular case of PyEval_EvalCodeEx, I think most values can't grow beyond 2**31 because the byte code format wouldn't allow such indexes. There should be documentation on what the valid ranges are for argcount, kwcount, locals, and what the rationale for these limitations are, and then they should get a consistent datatype.
Regards, Martin
- Previous message: [Python-Dev] 64 bit warnings
- Next message: [Python-Dev] PEP 30XZ: Simplified Parsing
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]