Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ac40c6c commit b2b1543Copy full SHA for b2b1543
1 file changed
Python/ceval.c
@@ -2468,8 +2468,9 @@ _PyEval_EvalFrameDefault(PyFrameObject *f, int throwflag)
2468
TARGET(STORE_DEREF) {
2469
PyObject *v = POP();
2470
PyObject *cell = freevars[oparg];
2471
- PyCell_Set(cell, v);
2472
- Py_DECREF(v);
+ PyObject *oldobj = PyCell_GET(cell);
+ PyCell_SET(cell, v);
2473
+ Py_XDECREF(oldobj);
2474
DISPATCH();
2475
}
2476
0 commit comments