From bf5eec6dff59b7e013f0f7dd06bd9325c39285ee Mon Sep 17 00:00:00 2001 From: Vitja Makarov Date: Sun, 9 Jan 2011 19:30:17 +0300 Subject: [PATCH] Fix naming problem --- Cython/Compiler/Nodes.py | 6 +++--- Cython/Compiler/ParseTreeTransforms.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cython/Compiler/Nodes.py b/Cython/Compiler/Nodes.py index 01ce116d..b23b81fb 100644 --- a/Cython/Compiler/Nodes.py +++ b/Cython/Compiler/Nodes.py @@ -2951,9 +2951,9 @@ class GeneratorBodyDefNode(DefNode): def declare_generator_body(self, env): prefix = env.next_id(env.scope_prefix) - entry = env.declare_var(prefix + 'generator', py_object_type, self.pos, visibility='private') - entry.func_cname = \ - Naming.genbody_prefix + prefix + self.name + name = env.next_id('generator') + entry = env.declare_var(prefix + name, py_object_type, self.pos, visibility='private') + entry.func_cname = Naming.genbody_prefix + prefix + name entry.qualified_name = EncodedString(self.name) self.entry = entry diff --git a/Cython/Compiler/ParseTreeTransforms.py b/Cython/Compiler/ParseTreeTransforms.py index af79e7e4..01be309d 100644 --- a/Cython/Compiler/ParseTreeTransforms.py +++ b/Cython/Compiler/ParseTreeTransforms.py @@ -208,7 +208,7 @@ class PostParse(ScopeTrackingTransform): self.genexpr_counter += 1 node.genexpr_name = EncodedString(u'genexpr%d' % genexpr_id) - node.def_node = Nodes.DefNode(node.pos, name=node.genexpr_name, + node.def_node = Nodes.DefNode(node.pos, name=node.name, doc=None, args=[], star_arg=None, starstar_arg=None, -- 2.26.2