@@ -372,14 +372,14 @@ vgetargs1_impl(PyObject *compat_args, PyObject *const *stack, Py_ssize_t nargs,
372
372
if (nargs < min || max < nargs ) {
373
373
if (message == NULL )
374
374
PyErr_Format (PyExc_TypeError ,
375
- "%.150s%s takes %s %d argument%s (%ld given)" ,
375
+ "%.150s%s takes %s %d argument%s (%zd given)" ,
376
376
fname == NULL ? "function" : fname ,
377
377
fname == NULL ? "" : "()" ,
378
378
min == max ? "exactly"
379
379
: nargs < min ? "at least" : "at most" ,
380
380
nargs < min ? min : max ,
381
381
(nargs < min ? min : max ) == 1 ? "" : "s" ,
382
- Py_SAFE_DOWNCAST ( nargs , Py_ssize_t , long ) );
382
+ nargs );
383
383
else
384
384
PyErr_SetString (PyExc_TypeError , message );
385
385
return cleanreturn (0 , & freelist );
@@ -1741,7 +1741,7 @@ vgetargskeywords(PyObject *args, PyObject *kwargs, const char *format,
1741
1741
else {
1742
1742
PyErr_Format (PyExc_TypeError ,
1743
1743
"%.200s%s takes %s %d positional argument%s"
1744
- " (%d given)" ,
1744
+ " (%zd given)" ,
1745
1745
(fname == NULL ) ? "function" : fname ,
1746
1746
(fname == NULL ) ? "" : "()" ,
1747
1747
(min != INT_MAX ) ? "at most" : "exactly" ,
@@ -1826,7 +1826,7 @@ vgetargskeywords(PyObject *args, PyObject *kwargs, const char *format,
1826
1826
if (skip ) {
1827
1827
PyErr_Format (PyExc_TypeError ,
1828
1828
"%.200s%s takes %s %d positional argument%s"
1829
- " (%d given)" ,
1829
+ " (%zd given)" ,
1830
1830
(fname == NULL ) ? "function" : fname ,
1831
1831
(fname == NULL ) ? "" : "()" ,
1832
1832
(Py_MIN (pos , min ) < i ) ? "at least" : "exactly" ,
@@ -2194,7 +2194,7 @@ vgetargskeywordsfast_impl(PyObject *const *args, Py_ssize_t nargs,
2194
2194
Py_ssize_t min = Py_MIN (pos , parser -> min );
2195
2195
PyErr_Format (PyExc_TypeError ,
2196
2196
"%.200s%s takes %s %d positional argument%s"
2197
- " (%d given)" ,
2197
+ " (%zd given)" ,
2198
2198
(parser -> fname == NULL ) ? "function" : parser -> fname ,
2199
2199
(parser -> fname == NULL ) ? "" : "()" ,
2200
2200
min < parser -> max ? "at least" : "exactly" ,
0 commit comments