diff options
| author | Amaury Forgeot d'Arc <amauryfa@gmail.com> | 2008-09-10 22:04:45 +0000 |
|---|---|---|
| committer | Amaury Forgeot d'Arc <amauryfa@gmail.com> | 2008-09-10 22:04:45 +0000 |
| commit | 05e344954de5f4e55eb49dc44b0f8e1ec272a06c (patch) | |
| tree | 85368f03ea1781b7669c3ebb94a5e40d57e163aa /Modules/_collectionsmodule.c | |
| parent | 4dd3a50ca480eef7bd898cfbfef8377231e18ae9 (diff) | |
| download | cpython-git-05e344954de5f4e55eb49dc44b0f8e1ec272a06c.tar.gz | |
#3743: PY_FORMAT_SIZE_T is designed for the OS "printf" functions, not for
PyString_FromFormat which has an independent implementation, and uses "%zd".
This makes a difference on win64, where printf needs "%Id" to display
64bit values. For example, queue.__repr__ was incorrect.
Reviewed by Martin von Loewis.
Diffstat (limited to 'Modules/_collectionsmodule.c')
| -rw-r--r-- | Modules/_collectionsmodule.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/_collectionsmodule.c b/Modules/_collectionsmodule.c index d6dcffd413..da000d0e80 100644 --- a/Modules/_collectionsmodule.c +++ b/Modules/_collectionsmodule.c @@ -670,7 +670,7 @@ deque_repr(PyObject *deque) return NULL; } if (((dequeobject *)deque)->maxlen != -1) - fmt = PyString_FromFormat("deque(%%r, maxlen=%" PY_FORMAT_SIZE_T "d)", + fmt = PyString_FromFormat("deque(%%r, maxlen=%zd)", ((dequeobject *)deque)->maxlen); else fmt = PyString_FromString("deque(%r)"); |
