Author: Armin Rigo <[email protected]>
Branch: py3.5
Changeset: r88385:6299e1a8556b
Date: 2016-11-15 10:43 +0100
http://bitbucket.org/pypy/pypy/changeset/6299e1a8556b/

Log:    Fix test_clear_locals() from cbba0303793c

diff --git a/pypy/interpreter/pyframe.py b/pypy/interpreter/pyframe.py
--- a/pypy/interpreter/pyframe.py
+++ b/pypy/interpreter/pyframe.py
@@ -962,7 +962,12 @@
 
         # clear the locals, including the cell/free vars, and the stack
         for i in range(len(self.locals_cells_stack_w)):
-            self.locals_cells_stack_w[i] = None
+            w_oldvalue = self.locals_cells_stack_w[i]
+            if isinstance(w_oldvalue, Cell):
+                w_newvalue = Cell()
+            else:
+                w_newvalue = None
+            self.locals_cells_stack_w[i] = w_newvalue
         self.valuestackdepth = 0
 
     def _convert_unexpected_exception(self, e):
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to