diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2019-01-11 14:01:14 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-11 14:01:14 (GMT) |
commit | 4fa9591025b6a098f3d6402e5413ee6740ede6c5 (patch) | |
tree | a81280fdd40c6a5b8c00613b0a8903624499afc5 /Modules/clinic/_weakref.c.h | |
parent | 5485085b324a45307c1ff4ec7d85b5998d7d5e0d (diff) | |
download | cpython-4fa9591025b6a098f3d6402e5413ee6740ede6c5.zip cpython-4fa9591025b6a098f3d6402e5413ee6740ede6c5.tar.gz cpython-4fa9591025b6a098f3d6402e5413ee6740ede6c5.tar.bz2 |
bpo-35582: Argument Clinic: inline parsing code for positional parameters. (GH-11313)
Diffstat (limited to 'Modules/clinic/_weakref.c.h')
-rw-r--r-- | Modules/clinic/_weakref.c.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/Modules/clinic/_weakref.c.h b/Modules/clinic/_weakref.c.h index 21f00ff..aa0d77f 100644 --- a/Modules/clinic/_weakref.c.h +++ b/Modules/clinic/_weakref.c.h @@ -50,13 +50,18 @@ _weakref__remove_dead_weakref(PyObject *module, PyObject *const *args, Py_ssize_ PyObject *dct; PyObject *key; - if (!_PyArg_ParseStack(args, nargs, "O!O:_remove_dead_weakref", - &PyDict_Type, &dct, &key)) { + if (!_PyArg_CheckPositional("_remove_dead_weakref", nargs, 2, 2)) { goto exit; } + if (!PyDict_Check(args[0])) { + _PyArg_BadArgument("_remove_dead_weakref", 1, "dict", args[0]); + goto exit; + } + dct = args[0]; + key = args[1]; return_value = _weakref__remove_dead_weakref_impl(module, dct, key); exit: return return_value; } -/*[clinic end generated code: output=927e889feb8a7dc4 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=eae22e2d2e43120e input=a9049054013a1b77]*/ |