[Python-Dev] [Python-checkins] r41972 - python/branches/ssize_t/Objects/funcobject.c

"Martin v. Löwis" martin at v.loewis.de
Mon Jan 9 08:48:47 CET 2006


Tim Peters wrote:
> We could use the "I" (capital letter eye) length modifier under VC7.1.
>  That's good for both size_t and ptrdiff_t formats under VC7.1, where
> ptrdiff_t under VC7.1 is really the same concept as Py_ssize_t.

ptrdiff_t has the advantage of being available on all platforms,
being part of C89 (IIRC). Should we use ptrdiff_t instead of
Py_ssize_t? Formally, ptrdiff_t could be different from size_t
(in width); reportedly, there are 8086 compilers which had
a 16-bit size_t (maximum size of a segment), but a 32-bit
ptrdiff_t (allowing for cross-segment differences, something
that apparently became undefined in C99).

Regards,
Martin


More information about the Python-Dev mailing list