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
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,