summaryrefslogtreecommitdiffstats
path: root/Python/Python-ast.c
diff options
context:
space:
mode:
authorAmaury Forgeot d'Arc <amauryfa@gmail.com>2008-09-10 22:04:45 (GMT)
committerAmaury Forgeot d'Arc <amauryfa@gmail.com>2008-09-10 22:04:45 (GMT)
commit05e344954de5f4e55eb49dc44b0f8e1ec272a06c (patch)
tree85368f03ea1781b7669c3ebb94a5e40d57e163aa /Python/Python-ast.c
parent4dd3a50ca480eef7bd898cfbfef8377231e18ae9 (diff)
downloadcpython-05e344954de5f4e55eb49dc44b0f8e1ec272a06c.zip
cpython-05e344954de5f4e55eb49dc44b0f8e1ec272a06c.tar.gz
cpython-05e344954de5f4e55eb49dc44b0f8e1ec272a06c.tar.bz2
#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 'Python/Python-ast.c')
-rw-r--r--Python/Python-ast.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/Python-ast.c b/Python/Python-ast.c
index f958145..1c78515 100644
--- a/Python/Python-ast.c
+++ b/Python/Python-ast.c
@@ -387,7 +387,7 @@ ast_type_init(PyObject *self, PyObject *args, PyObject *kw)
if (PyTuple_GET_SIZE(args) > 0) {
if (numfields != PyTuple_GET_SIZE(args)) {
PyErr_Format(PyExc_TypeError, "%.400s constructor takes %s"
- "%" PY_FORMAT_SIZE_T "d positional argument%s",
+ "%zd positional argument%s",
Py_TYPE(self)->tp_name,
numfields == 0 ? "" : "either 0 or ",
numfields, numfields == 1 ? "" : "s");