summaryrefslogtreecommitdiff
path: root/Modules/_collectionsmodule.c
diff options
context:
space:
mode:
authorAmaury Forgeot d'Arc <amauryfa@gmail.com>2008-09-10 22:04:45 +0000
committerAmaury Forgeot d'Arc <amauryfa@gmail.com>2008-09-10 22:04:45 +0000
commit05e344954de5f4e55eb49dc44b0f8e1ec272a06c (patch)
tree85368f03ea1781b7669c3ebb94a5e40d57e163aa /Modules/_collectionsmodule.c
parent4dd3a50ca480eef7bd898cfbfef8377231e18ae9 (diff)
downloadcpython-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.c2
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)");