Commit bf5eec6d authored by Vitja Makarov's avatar Vitja Makarov

Fix naming problem

parent 924f1dad
...@@ -2951,9 +2951,9 @@ class GeneratorBodyDefNode(DefNode): ...@@ -2951,9 +2951,9 @@ class GeneratorBodyDefNode(DefNode):
def declare_generator_body(self, env): def declare_generator_body(self, env):
prefix = env.next_id(env.scope_prefix) prefix = env.next_id(env.scope_prefix)
entry = env.declare_var(prefix + 'generator', py_object_type, self.pos, visibility='private') name = env.next_id('generator')
entry.func_cname = \ entry = env.declare_var(prefix + name, py_object_type, self.pos, visibility='private')
Naming.genbody_prefix + prefix + self.name entry.func_cname = Naming.genbody_prefix + prefix + name
entry.qualified_name = EncodedString(self.name) entry.qualified_name = EncodedString(self.name)
self.entry = entry self.entry = entry
......
...@@ -208,7 +208,7 @@ class PostParse(ScopeTrackingTransform): ...@@ -208,7 +208,7 @@ class PostParse(ScopeTrackingTransform):
self.genexpr_counter += 1 self.genexpr_counter += 1
node.genexpr_name = EncodedString(u'genexpr%d' % genexpr_id) 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, doc=None,
args=[], star_arg=None, args=[], star_arg=None,
starstar_arg=None, starstar_arg=None,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment