add safety fix for Python globals in debug writer
authorStefan Behnel <stefan_ml@behnel.de>
Mon, 15 Apr 2013 17:30:39 +0000 (19:30 +0200)
committerStefan Behnel <stefan_ml@behnel.de>
Mon, 15 Apr 2013 17:30:39 +0000 (19:30 +0200)
Cython/Compiler/ParseTreeTransforms.py

index 99eb5fd..aac413e 100644 (file)
@@ -2891,6 +2891,9 @@ class DebugTransform(CythonTransform):
 
     def serialize_local_variables(self, entries):
         for entry in entries.values():
+            if not entry.cname:
+                # not a local variable
+                continue
             if entry.type.is_pyobject:
                 vartype = 'PythonObject'
             else: