From: Dag Sverre Seljebotn Date: Sat, 19 Jul 2008 20:45:34 +0000 (+0200) Subject: Pruning cdef variable declarations after analysis X-Git-Tag: 0.9.8.1~49^2~89 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=7499c3d437bf483a7c08b3871db5bed1343f1f5f;p=cython.git Pruning cdef variable declarations after analysis --- diff --git a/Cython/Compiler/ParseTreeTransforms.py b/Cython/Compiler/ParseTreeTransforms.py index 4cf5e356..57828983 100644 --- a/Cython/Compiler/ParseTreeTransforms.py +++ b/Cython/Compiler/ParseTreeTransforms.py @@ -272,6 +272,13 @@ class AnalyseDeclarationsTransform(CythonTransform): self.env_stack.pop() return node + # Some nodes are no longer needed after declaration + # analysis and can be dropped. The analysis was performed + # on these nodes in a seperate recursive process from the + # enclosing function or module, so we can simply drop them. + def visit_CVarDefNode(self, node): + return None + class AnalyseExpressionsTransform(CythonTransform): def visit_ModuleNode(self, node): node.body.analyse_expressions(node.scope)