bpo-23867: Argument Clinic: inline parsing code for a single positional parameter. (GH-9689)

This commit is contained in:
Serhiy Storchaka 2018-12-25 13:23:47 +02:00 committed by GitHub
parent 65ce60aef1
commit 32d96a2b5b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
49 changed files with 1677 additions and 275 deletions

View file

@ -612,6 +612,14 @@ convertitem(PyObject *arg, const char **p_format, va_list *p_va, int flags,
/* Format an error message generated by convertsimple(). */
void
_PyArg_BadArgument(const char *fname, const char *expected, PyObject *arg)
{
PyErr_Format(PyExc_TypeError, "%.200s() argument must be %.50s, not %.50s",
fname, expected,
arg == Py_None ? "None" : arg->ob_type->tp_name);
}
static const char *
converterr(const char *expected, PyObject *arg, char *msgbuf, size_t bufsize)
{