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
69d405b4
Commit
69d405b4
authored
Aug 15, 2011
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
C/C++ code fix: make sure sequence unpacking utility variable is declared at the start of a block
parent
418bcde3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
Cython/Compiler/ExprNodes.py
Cython/Compiler/ExprNodes.py
+4
-3
No files found.
Cython/Compiler/ExprNodes.py
View file @
69d405b4
...
@@ -4101,6 +4101,8 @@ class SequenceNode(ExprNode):
...
@@ -4101,6 +4101,8 @@ class SequenceNode(ExprNode):
code
.
put_incref
(
item
.
result
(),
item
.
ctype
())
code
.
put_incref
(
item
.
result
(),
item
.
ctype
())
rhs
.
generate_disposal_code
(
code
)
rhs
.
generate_disposal_code
(
code
)
code
.
putln
(
"} else {"
)
code
.
putln
(
"} else {"
)
else
:
code
.
putln
(
"{"
)
if
special_unpack
and
rhs
.
type
is
tuple_type
:
if
special_unpack
and
rhs
.
type
is
tuple_type
:
code
.
globalstate
.
use_utility_code
(
tuple_unpacking_error_code
)
code
.
globalstate
.
use_utility_code
(
tuple_unpacking_error_code
)
...
@@ -4109,8 +4111,7 @@ class SequenceNode(ExprNode):
...
@@ -4109,8 +4111,7 @@ class SequenceNode(ExprNode):
code
.
putln
(
code
.
error_goto
(
self
.
pos
))
code
.
putln
(
code
.
error_goto
(
self
.
pos
))
else
:
else
:
self
.
generate_generic_parallel_unpacking_code
(
code
,
rhs
)
self
.
generate_generic_parallel_unpacking_code
(
code
,
rhs
)
if
special_unpack
:
code
.
putln
(
"}"
)
code
.
putln
(
"}"
)
for
value_node
in
self
.
coerced_unpacked_items
:
for
value_node
in
self
.
coerced_unpacked_items
:
value_node
.
generate_evaluation_code
(
code
)
value_node
.
generate_evaluation_code
(
code
)
...
@@ -4134,7 +4135,7 @@ class SequenceNode(ExprNode):
...
@@ -4134,7 +4135,7 @@ class SequenceNode(ExprNode):
def
generate_generic_parallel_unpacking_code
(
self
,
code
,
rhs
):
def
generate_generic_parallel_unpacking_code
(
self
,
code
,
rhs
):
code
.
globalstate
.
use_utility_code
(
iternext_unpacking_end_utility_code
)
code
.
globalstate
.
use_utility_code
(
iternext_unpacking_end_utility_code
)
code
.
globalstate
.
use_utility_code
(
raise_need_more_values_to_unpack
)
code
.
globalstate
.
use_utility_code
(
raise_need_more_values_to_unpack
)
code
.
putln
(
"Py_ssize_t index = -1;"
)
code
.
putln
(
"Py_ssize_t index = -1;"
)
# must be at the start of a C block!
iterator_temp
=
code
.
funcstate
.
allocate_temp
(
py_object_type
,
manage_ref
=
True
)
iterator_temp
=
code
.
funcstate
.
allocate_temp
(
py_object_type
,
manage_ref
=
True
)
code
.
putln
(
code
.
putln
(
...
...
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