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
Gwenaël Samain
cython
Commits
ea6a71ac
Commit
ea6a71ac
authored
Nov 17, 2012
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make the RHS of assignments safe if the LHS target is a subset of a RHS attribute access
parent
f7cd93f2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
Cython/Compiler/Nodes.py
Cython/Compiler/Nodes.py
+9
-6
No files found.
Cython/Compiler/Nodes.py
View file @
ea6a71ac
...
...
@@ -4466,8 +4466,11 @@ class SingleAssignmentNode(AssignmentNode):
dtype
=
self
.
lhs
.
type
self
.
rhs
=
self
.
rhs
.
coerce_to
(
dtype
,
env
)
if
use_temp
:
if
use_temp
or
self
.
rhs
.
is_attribute
:
# cdef attribute access traverses pointers
self
.
rhs
=
self
.
rhs
.
coerce_to_temp
(
env
)
else
:
self
.
rhs
=
self
.
rhs
.
coerce_to_simple
(
env
)
def
generate_rhs_evaluation_code
(
self
,
code
):
self
.
rhs
.
generate_evaluation_code
(
code
)
...
...
@@ -4506,11 +4509,11 @@ class CascadedAssignmentNode(AssignmentNode):
from
ExprNodes
import
CloneNode
,
ProxyNode
self
.
rhs
.
analyse_types
(
env
)
if
not
self
.
rhs
.
is_simple
()
:
if
use_temp
:
self
.
rhs
=
self
.
rhs
.
coerce_to_temp
(
env
)
else
:
self
.
rhs
=
self
.
rhs
.
coerce_to_simple
(
env
)
if
use_temp
or
self
.
rhs
.
is_attribute
:
# (cdef) attribute access traverses pointers
self
.
rhs
=
self
.
rhs
.
coerce_to_temp
(
env
)
else
:
self
.
rhs
=
self
.
rhs
.
coerce_to_simple
(
env
)
self
.
rhs
=
ProxyNode
(
self
.
rhs
)
self
.
coerced_rhs_list
=
[]
...
...
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