Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
3d1149e9
Commit
3d1149e9
authored
Dec 13, 2010
by
Vitja Makarov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename create_abstract_generator to create_generator_class, don't set entry cname
parent
b59160e8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
Cython/Compiler/ParseTreeTransforms.py
Cython/Compiler/ParseTreeTransforms.py
+2
-3
No files found.
Cython/Compiler/ParseTreeTransforms.py
View file @
3d1149e9
...
@@ -1387,7 +1387,7 @@ class CreateClosureClasses(CythonTransform):
...
@@ -1387,7 +1387,7 @@ class CreateClosureClasses(CythonTransform):
self
.
visitchildren
(
node
)
self
.
visitchildren
(
node
)
return
node
return
node
def
create_
abstract_generator
(
self
,
target_module_scope
,
pos
):
def
create_
generator_class
(
self
,
target_module_scope
,
pos
):
if
self
.
generator_class
:
if
self
.
generator_class
:
return
self
.
generator_class
return
self
.
generator_class
# XXX: make generator class creation cleaner
# XXX: make generator class creation cleaner
...
@@ -1395,7 +1395,6 @@ class CreateClosureClasses(CythonTransform):
...
@@ -1395,7 +1395,6 @@ class CreateClosureClasses(CythonTransform):
objstruct_cname
=
'__pyx_Generator_object'
,
objstruct_cname
=
'__pyx_Generator_object'
,
typeobj_cname
=
'__pyx_Generator_type'
,
typeobj_cname
=
'__pyx_Generator_type'
,
pos
=
pos
,
defining
=
True
,
implementing
=
True
)
pos
=
pos
,
defining
=
True
,
implementing
=
True
)
entry
.
cname
=
'Generator'
klass
=
entry
.
type
.
scope
klass
=
entry
.
type
.
scope
klass
.
is_internal
=
True
klass
.
is_internal
=
True
klass
.
directives
=
{
'final'
:
True
}
klass
.
directives
=
{
'final'
:
True
}
...
@@ -1470,7 +1469,7 @@ class CreateClosureClasses(CythonTransform):
...
@@ -1470,7 +1469,7 @@ class CreateClosureClasses(CythonTransform):
node
.
needs_outer_scope
=
False
node
.
needs_outer_scope
=
False
if
node
.
is_generator
:
if
node
.
is_generator
:
generator_class
=
self
.
create_
abstract_generator
(
target_module_scope
,
node
.
pos
)
generator_class
=
self
.
create_
generator_class
(
target_module_scope
,
node
.
pos
)
elif
not
in_closure
and
not
from_closure
:
elif
not
in_closure
and
not
from_closure
:
return
return
elif
not
in_closure
:
elif
not
in_closure
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment