From 05e344954de5f4e55eb49dc44b0f8e1ec272a06c Mon Sep 17 00:00:00 2001 From: Amaury Forgeot d'Arc Date: Wed, 10 Sep 2008 22:04:45 +0000 Subject: #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. --- Modules/_collectionsmodule.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Modules/_collectionsmodule.c') 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)"); -- cgit v1.2.1