[Python-Dev] [Python-checkins] r41972 - python/branches/ssize_t/Objects/funcobject.c (original) (raw)
Tim Peters tim.peters at gmail.com
Mon Jan 9 19:14:10 CET 2006
- Previous message: [Python-Dev] [Python-checkins] r41972 - python/branches/ssize_t/Objects/funcobject.c
- Next message: [Python-Dev] [Python-checkins] r41972 - python/branches/ssize_t/Objects/funcobject.c
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
[Tim]
We could use the "I" (capital letter eye) length modifier under VC7.1. That's good for both sizet and ptrdifft formats under VC7.1, where ptrdifft under VC7.1 is really the same concept as Pyssizet.
[Martin]
ptrdifft has the advantage of being available on all platforms, being part of C89 (IIRC). Should we use ptrdifft instead of Pyssizet? Formally, ptrdifft could be different from sizet (in width); reportedly, there are 8086 compilers which had a 16-bit sizet (maximum size of a segment), but a 32-bit ptrdifft (allowing for cross-segment differences, something that apparently became undefined in C99).
I grew up on 60- and 64-bit boxes, but all I've worked on for the last decade is 32-bit Pentium chips. If there's a Python platform where sizeof(size_t) != sizeof(ptrdiff_t), I don't know about it, but I'm not sure I have a reason to expect to be aware of such things anymore.
Regardless, I like Py_ssize_t: it clearly says "same width as size_t, but signed". "Difference between two pointers" is obscurely related to that at best.
- Previous message: [Python-Dev] [Python-checkins] r41972 - python/branches/ssize_t/Objects/funcobject.c
- Next message: [Python-Dev] [Python-checkins] r41972 - python/branches/ssize_t/Objects/funcobject.c
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]