Mercurial > cpython-lru_cache-weakref
comparison Python/Python-ast.c @ 49139:6ae2d4b507a2
Merged revisions 66377 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r66377 | amaury.forgeotdarc | 2008-09-11 00:04:45 +0200 (jeu., 11 sept. 2008) | 8 lines
#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.
........
| author | Amaury Forgeot d'Arc <amauryfa@gmail.com> |
|---|---|
| date | Wed, 10 Sep 2008 22:24:24 +0000 |
| parents | 94f64f11fdd0 |
| children | 2a38771cecdd |
comparison
equal
deleted
inserted
replaced
| 49137:17475eb55067 | 49139:6ae2d4b507a2 |
|---|---|
| 410 } | 410 } |
| 411 res = 0; /* if no error occurs, this stays 0 to the end */ | 411 res = 0; /* if no error occurs, this stays 0 to the end */ |
| 412 if (PyTuple_GET_SIZE(args) > 0) { | 412 if (PyTuple_GET_SIZE(args) > 0) { |
| 413 if (numfields != PyTuple_GET_SIZE(args)) { | 413 if (numfields != PyTuple_GET_SIZE(args)) { |
| 414 PyErr_Format(PyExc_TypeError, "%.400s constructor takes %s" | 414 PyErr_Format(PyExc_TypeError, "%.400s constructor takes %s" |
| 415 "%" PY_FORMAT_SIZE_T "d positional argument%s", | 415 "%zd positional argument%s", |
| 416 Py_TYPE(self)->tp_name, | 416 Py_TYPE(self)->tp_name, |
| 417 numfields == 0 ? "" : "either 0 or ", | 417 numfields == 0 ? "" : "either 0 or ", |
| 418 numfields, numfields == 1 ? "" : "s"); | 418 numfields, numfields == 1 ? "" : "s"); |
| 419 res = -1; | 419 res = -1; |
| 420 goto cleanup; | 420 goto cleanup; |
