gh-146615: Fix format specifiers in Python/ directory (GH-146619)

This commit is contained in:
sunmy2019 2026-03-31 15:59:17 +08:00 committed by GitHub
parent b7055533ab
commit dcb260eff2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 13 additions and 13 deletions

View file

@ -1607,7 +1607,7 @@ map_next(PyObject *self)
// ValueError: map() argument 3 is shorter than arguments 1-2
const char* plural = i == 1 ? " " : "s 1-";
PyErr_Format(PyExc_ValueError,
"map() argument %d is shorter than argument%s%d",
"map() argument %zd is shorter than argument%s%zd",
i + 1, plural, i);
goto exit_no_result;
}
@ -1618,7 +1618,7 @@ map_next(PyObject *self)
Py_DECREF(val);
const char* plural = i == 1 ? " " : "s 1-";
PyErr_Format(PyExc_ValueError,
"map() argument %d is longer than argument%s%d",
"map() argument %zd is longer than argument%s%zd",
i + 1, plural, i);
goto exit_no_result;
}
@ -3307,7 +3307,7 @@ zip_next(PyObject *self)
// ValueError: zip() argument 3 is shorter than arguments 1-2
const char* plural = i == 1 ? " " : "s 1-";
return PyErr_Format(PyExc_ValueError,
"zip() argument %d is shorter than argument%s%d",
"zip() argument %zd is shorter than argument%s%zd",
i + 1, plural, i);
}
for (i = 1; i < tuplesize; i++) {
@ -3317,7 +3317,7 @@ zip_next(PyObject *self)
Py_DECREF(item);
const char* plural = i == 1 ? " " : "s 1-";
return PyErr_Format(PyExc_ValueError,
"zip() argument %d is longer than argument%s%d",
"zip() argument %zd is longer than argument%s%zd",
i + 1, plural, i);
}
if (PyErr_Occurred()) {