Document that _PyFunction_FastCallDict() must copy kwargs

Issue #29318: Caller and callee functions must not share the dictionary:
kwargs must be copied.
This commit is contained in:
Victor Stinner 2017-02-01 17:04:52 +01:00
parent f94b68a025
commit 122fb562d4
1 changed files with 2 additions and 0 deletions

View File

@ -5039,6 +5039,8 @@ _PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs,
if (nk != 0) {
Py_ssize_t pos, i;
/* Issue #29318: Caller and callee functions must not share the
dictionary: kwargs must be copied. */
kwtuple = PyTuple_New(2 * nk);
if (kwtuple == NULL) {
return NULL;