Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b2b1543

Browse files
committed
merge
1 parent ac40c6c commit b2b1543

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

Python/ceval.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2468,8 +2468,9 @@ _PyEval_EvalFrameDefault(PyFrameObject *f, int throwflag)
24682468
TARGET(STORE_DEREF) {
24692469
PyObject *v = POP();
24702470
PyObject *cell = freevars[oparg];
2471-
PyCell_Set(cell, v);
2472-
Py_DECREF(v);
2471+
PyObject *oldobj = PyCell_GET(cell);
2472+
PyCell_SET(cell, v);
2473+
Py_XDECREF(oldobj);
24732474
DISPATCH();
24742475
}
24752476

0 commit comments

Comments
 (0)