From 15d09f50f7ab81daa56c82d96bc9987050cc47c6 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Mon, 15 Apr 2013 19:30:39 +0200 Subject: [PATCH] add safety fix for Python globals in debug writer --- Cython/Compiler/ParseTreeTransforms.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Cython/Compiler/ParseTreeTransforms.py b/Cython/Compiler/ParseTreeTransforms.py index 99eb5fd..aac413e 100644 --- a/Cython/Compiler/ParseTreeTransforms.py +++ b/Cython/Compiler/ParseTreeTransforms.py @@ -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: -- 2.7.4