]> granicus.if.org Git - python/commitdiff
Document that _PyFunction_FastCallDict() must copy kwargs
authorVictor Stinner <victor.stinner@gmail.com>
Wed, 1 Feb 2017 16:04:52 +0000 (17:04 +0100)
committerVictor Stinner <victor.stinner@gmail.com>
Wed, 1 Feb 2017 16:04:52 +0000 (17:04 +0100)
Issue #29318: Caller and callee functions must not share the dictionary:
kwargs must be copied.

Python/ceval.c

index 87384709c91de9cdabdd75ae80fc422d0450b266..298ad55b810a95d02195609e8ec5918ada2194c4 100644 (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;