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 | 743dc0dee1bfab3615f7b9c17d9fd6cdf4cb64dd (patch) | |
| tree | 2646589c47be46bb547fda13b25d58ec02b45959 /Python/Python-ast.c | |
| parent | d3cb3816f5263c0180cc460617054a4db075dec4 (diff) | |
| download | cpython-743dc0dee1bfab3615f7b9c17d9fd6cdf4cb64dd.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 'Python/Python-ast.c')
| -rw-r--r-- | Python/Python-ast.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/Python-ast.c b/Python/Python-ast.c index f958145a23..1c78515bce 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"); |
