Kaydet (Commit) cb29ec5f authored tarafından Victor Stinner's avatar Victor Stinner

PY_FORMAT_SIZE_T should not be used with PyErr_Format(), PyErr_Format("%zd") is

portable
üst 3f658bec
...@@ -1476,8 +1476,7 @@ vgetargskeywords(PyObject *args, PyObject *keywords, const char *format, ...@@ -1476,8 +1476,7 @@ vgetargskeywords(PyObject *args, PyObject *keywords, const char *format,
nkeywords = (keywords == NULL) ? 0 : PyDict_Size(keywords); nkeywords = (keywords == NULL) ? 0 : PyDict_Size(keywords);
if (nargs + nkeywords > len) { if (nargs + nkeywords > len) {
PyErr_Format(PyExc_TypeError, PyErr_Format(PyExc_TypeError,
"%s%s takes at most %d argument%s " "%s%s takes at most %d argument%s (%zd given)",
"(%" PY_FORMAT_SIZE_T "d given)",
(fname == NULL) ? "function" : fname, (fname == NULL) ? "function" : fname,
(fname == NULL) ? "" : "()", (fname == NULL) ? "" : "()",
len, len,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment