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
c66708bd
Commit
c66708bd
authored
Apr 15, 2011
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make auto_cpdef play nicely with closure functions
parent
920ddf72
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
4 deletions
+5
-4
Cython/Compiler/Main.py
Cython/Compiler/Main.py
+1
-1
Cython/Compiler/ParseTreeTransforms.py
Cython/Compiler/ParseTreeTransforms.py
+4
-2
tests/bugs.txt
tests/bugs.txt
+0
-1
No files found.
Cython/Compiler/Main.py
View file @
c66708bd
...
...
@@ -135,8 +135,8 @@ class Context(object):
PostParse
(
self
),
_specific_post_parse
,
InterpretCompilerDirectives
(
self
,
self
.
compiler_directives
),
_align_function_definitions
,
MarkClosureVisitor
(
self
),
_align_function_definitions
,
ConstantFolding
(),
FlattenInListTransform
(),
WithTransform
(
self
),
...
...
Cython/Compiler/ParseTreeTransforms.py
View file @
c66708bd
...
...
@@ -1425,9 +1425,11 @@ class AlignFunctionDefinitions(CythonTransform):
error
(
pxd_def
.
pos
,
"previous declaration here"
)
return
None
node
=
node
.
as_cfunction
(
pxd_def
)
elif
self
.
scope
.
is_module_scope
and
self
.
directives
[
'auto_cpdef'
]:
elif
(
self
.
scope
.
is_module_scope
and
not
node
.
needs_closure
and
self
.
directives
[
'auto_cpdef'
]):
node
=
node
.
as_cfunction
(
scope
=
self
.
scope
)
# Enable this when
internal
def functions are allowed.
# Enable this when
nested c
def functions are allowed.
# self.visitchildren(node)
return
node
...
...
tests/bugs.txt
View file @
c66708bd
...
...
@@ -19,7 +19,6 @@ for_from_pyvar_loop_T601
decorators_T593
temp_sideeffects_T654
class_scope_T671
auto_cpdef_closures
# CPython regression tests that don't current work:
pyregr.test_threadsignals
...
...
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