diff options
| author | Raymond Hettinger <python@rcn.com> | 2016-11-11 04:32:11 -0800 |
|---|---|---|
| committer | Raymond Hettinger <python@rcn.com> | 2016-11-11 04:32:11 -0800 |
| commit | b2b154374d921cccaf5de9faf633a6ae6e21892b (patch) | |
| tree | ed2916ef00ff286c29018841fcb444dc4e65dde1 /Python | |
| parent | ac40c6c575d2f6e619b998b7b91437f6a93bcde2 (diff) | |
| download | cpython-git-b2b154374d921cccaf5de9faf633a6ae6e21892b.tar.gz | |
merge
Diffstat (limited to 'Python')
| -rw-r--r-- | Python/ceval.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Python/ceval.c b/Python/ceval.c index d08b316db4..fe562a8450 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -2468,8 +2468,9 @@ _PyEval_EvalFrameDefault(PyFrameObject *f, int throwflag) TARGET(STORE_DEREF) { PyObject *v = POP(); PyObject *cell = freevars[oparg]; - PyCell_Set(cell, v); - Py_DECREF(v); + PyObject *oldobj = PyCell_GET(cell); + PyCell_SET(cell, v); + Py_XDECREF(oldobj); DISPATCH(); } |
