mirror of
https://github.com/python/cpython.git
synced 2025-09-27 02:39:58 +00:00
Use %zd format characters for Py_ssize_t types.
This commit is contained in:
parent
7c187bcc82
commit
572a9f32dc
1 changed files with 6 additions and 6 deletions
|
@ -1686,13 +1686,13 @@ PyArg_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t m
|
||||||
if (name != NULL)
|
if (name != NULL)
|
||||||
PyErr_Format(
|
PyErr_Format(
|
||||||
PyExc_TypeError,
|
PyExc_TypeError,
|
||||||
"%s expected %s%d arguments, got %d",
|
"%s expected %s%zd arguments, got %zd",
|
||||||
name, (min == max ? "" : "at least "), min, l);
|
name, (min == max ? "" : "at least "), min, l);
|
||||||
else
|
else
|
||||||
PyErr_Format(
|
PyErr_Format(
|
||||||
PyExc_TypeError,
|
PyExc_TypeError,
|
||||||
"unpacked tuple should have %s%d elements,"
|
"unpacked tuple should have %s%zd elements,"
|
||||||
" but has %d",
|
" but has %zd",
|
||||||
(min == max ? "" : "at least "), min, l);
|
(min == max ? "" : "at least "), min, l);
|
||||||
va_end(vargs);
|
va_end(vargs);
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -1701,13 +1701,13 @@ PyArg_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t m
|
||||||
if (name != NULL)
|
if (name != NULL)
|
||||||
PyErr_Format(
|
PyErr_Format(
|
||||||
PyExc_TypeError,
|
PyExc_TypeError,
|
||||||
"%s expected %s%d arguments, got %d",
|
"%s expected %s%zd arguments, got %zd",
|
||||||
name, (min == max ? "" : "at most "), max, l);
|
name, (min == max ? "" : "at most "), max, l);
|
||||||
else
|
else
|
||||||
PyErr_Format(
|
PyErr_Format(
|
||||||
PyExc_TypeError,
|
PyExc_TypeError,
|
||||||
"unpacked tuple should have %s%d elements,"
|
"unpacked tuple should have %s%zd elements,"
|
||||||
" but has %d",
|
" but has %zd",
|
||||||
(min == max ? "" : "at most "), max, l);
|
(min == max ? "" : "at most "), max, l);
|
||||||
va_end(vargs);
|
va_end(vargs);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue