[Python-Dev] Add Py_off_t and related APIs? (original) (raw)

"Martin v. Löwis" martin at v.loewis.de
Tue Jan 13 20:07:32 CET 2009


Is it ok to add the following: * a Pyofft type which is typedef'd to either PyLONGLONG (Windows) or offt (others) * three C API functions: PyNumberAsOfft, PyLongAsOfft, PyLongFromOfft * an additional type code for PyArgParseTuple and friends; I suggest 'N' since 'n' currently means Pyssizet, and a Pyofft should always be at least as wide as a Pyssizet ?

-1. How many functions actually require that type?

(the motivation is systems where Pyssizet is 32-bits wide, but large file support makes offt 64 bits wide)

For argument parsing, you should use "long long" if SIZEOF_OFF_T is 8 and long long is supported, and then assign to off_t as appropriate.

Regards, Martin



More information about the Python-Dev mailing list