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
Kirill Smelkov
cython
Commits
4b61de60
Commit
4b61de60
authored
Jul 31, 2017
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix "declaration after code" issue.
Closes #1801
parent
019f9ff5
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletion
+4
-1
CHANGES.rst
CHANGES.rst
+3
-0
Cython/Compiler/Nodes.py
Cython/Compiler/Nodes.py
+1
-1
No files found.
CHANGES.rst
View file @
4b61de60
...
@@ -12,6 +12,9 @@ Features added
...
@@ -12,6 +12,9 @@ Features added
Bugs fixed
Bugs fixed
----------
----------
* Invalid C code in generators (declaration after code).
(Github issue #1801)
* Arithmetic operations on ``const`` integer variables could generate invalid code.
* Arithmetic operations on ``const`` integer variables could generate invalid code.
(Github issue #1798).
(Github issue #1798).
...
...
Cython/Compiler/Nodes.py
View file @
4b61de60
...
@@ -4081,7 +4081,7 @@ class GeneratorBodyDefNode(DefNode):
...
@@ -4081,7 +4081,7 @@ class GeneratorBodyDefNode(DefNode):
profile
=
code
.
globalstate
.
directives
[
'profile'
]
profile
=
code
.
globalstate
.
directives
[
'profile'
]
linetrace
=
code
.
globalstate
.
directives
[
'linetrace'
]
linetrace
=
code
.
globalstate
.
directives
[
'linetrace'
]
if
profile
or
linetrace
:
if
profile
or
linetrace
:
code
.
put_trace_declarations
()
tempvardecl_
code
.
put_trace_declarations
()
# ----- Resume switch point.
# ----- Resume switch point.
code
.
funcstate
.
init_closure_temps
(
lenv
.
scope_class
.
type
.
scope
)
code
.
funcstate
.
init_closure_temps
(
lenv
.
scope_class
.
type
.
scope
)
...
...
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