Browse Source

Document that _PyFunction_FastCallDict() must copy kwargs

Issue #29318: Caller and callee functions must not share the dictionary:
kwargs must be copied.
pull/2/head
Victor Stinner 10 years ago
parent
commit
122fb562d4
  1. 2
      Python/ceval.c

2
Python/ceval.c

@ -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;

Loading…
Cancel
Save