mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Document kwnames in _PyObject_FastCallKeywords() and _PyStack_AsDict()
Issue #27213.
This commit is contained in:
parent
b8d768b019
commit
57f91ac95a
4 changed files with 48 additions and 25 deletions
|
@ -276,6 +276,11 @@ _PyCFunction_FastCallKeywords(PyObject *func, PyObject **stack,
|
|||
Py_ssize_t nkwargs;
|
||||
|
||||
assert(PyCFunction_Check(func));
|
||||
assert(nargs >= 0);
|
||||
assert(kwnames == NULL || PyTuple_CheckExact(kwnames));
|
||||
assert((nargs == 0 && nkwargs == 0) || stack != NULL);
|
||||
/* kwnames must only contains str strings, no subclass, and all keys must
|
||||
be unique */
|
||||
|
||||
nkwargs = (kwnames == NULL) ? 0 : PyTuple_GET_SIZE(kwnames);
|
||||
if (nkwargs > 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue