Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 572a9f3

Browse files
committed
Use %zd format characters for Py_ssize_t types.
1 parent 7c187bc commit 572a9f3

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

Python/getargs.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1686,13 +1686,13 @@ PyArg_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t m
16861686
if (name != NULL)
16871687
PyErr_Format(
16881688
PyExc_TypeError,
1689-
"%s expected %s%d arguments, got %d",
1689+
"%s expected %s%zd arguments, got %zd",
16901690
name, (min == max ? "" : "at least "), min, l);
16911691
else
16921692
PyErr_Format(
16931693
PyExc_TypeError,
1694-
"unpacked tuple should have %s%d elements,"
1695-
" but has %d",
1694+
"unpacked tuple should have %s%zd elements,"
1695+
" but has %zd",
16961696
(min == max ? "" : "at least "), min, l);
16971697
va_end(vargs);
16981698
return 0;
@@ -1701,13 +1701,13 @@ PyArg_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t m
17011701
if (name != NULL)
17021702
PyErr_Format(
17031703
PyExc_TypeError,
1704-
"%s expected %s%d arguments, got %d",
1704+
"%s expected %s%zd arguments, got %zd",
17051705
name, (min == max ? "" : "at most "), max, l);
17061706
else
17071707
PyErr_Format(
17081708
PyExc_TypeError,
1709-
"unpacked tuple should have %s%d elements,"
1710-
" but has %d",
1709+
"unpacked tuple should have %s%zd elements,"
1710+
" but has %zd",
17111711
(min == max ? "" : "at most "), max, l);
17121712
va_end(vargs);
17131713
return 0;

0 commit comments

Comments
 (0)