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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
cython
Commits
c72687b6
Commit
c72687b6
authored
Apr 01, 2011
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor code cleanup
parent
b8baa94d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
+6
-7
Cython/Compiler/ParseTreeTransforms.py
Cython/Compiler/ParseTreeTransforms.py
+6
-7
No files found.
Cython/Compiler/ParseTreeTransforms.py
View file @
c72687b6
...
@@ -1617,8 +1617,9 @@ class CreateClosureClasses(CythonTransform):
...
@@ -1617,8 +1617,9 @@ class CreateClosureClasses(CythonTransform):
inner_node
.
needs_self_code
=
False
inner_node
.
needs_self_code
=
False
node
.
needs_outer_scope
=
False
node
.
needs_outer_scope
=
False
base_type
=
None
if
node
.
is_generator
:
if
node
.
is_generator
:
generator_class
=
self
.
create_generator_class
(
target_module_scope
,
node
.
pos
)
base_type
=
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
:
...
@@ -1629,12 +1630,10 @@ class CreateClosureClasses(CythonTransform):
...
@@ -1629,12 +1630,10 @@ class CreateClosureClasses(CythonTransform):
as_name
=
'%s_%s'
%
(
target_module_scope
.
next_id
(
Naming
.
closure_class_prefix
),
node
.
entry
.
cname
)
as_name
=
'%s_%s'
%
(
target_module_scope
.
next_id
(
Naming
.
closure_class_prefix
),
node
.
entry
.
cname
)
if
node
.
is_generator
:
entry
=
target_module_scope
.
declare_c_class
(
entry
=
target_module_scope
.
declare_c_class
(
name
=
as_name
,
name
=
as_name
,
pos
=
node
.
pos
,
defining
=
True
,
pos
=
node
.
pos
,
defining
=
True
,
implementing
=
True
,
base_type
=
generator_class
)
implementing
=
True
,
base_type
=
base_type
)
else
:
entry
=
target_module_scope
.
declare_c_class
(
name
=
as_name
,
pos
=
node
.
pos
,
defining
=
True
,
implementing
=
True
)
func_scope
.
scope_class
=
entry
func_scope
.
scope_class
=
entry
class_scope
=
entry
.
type
.
scope
class_scope
=
entry
.
type
.
scope
class_scope
.
is_internal
=
True
class_scope
.
is_internal
=
True
...
...
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