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
f21e5878
Commit
f21e5878
authored
Nov 23, 2013
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor code cleanup
parent
77374dab
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
5 deletions
+2
-5
Cython/Compiler/Nodes.py
Cython/Compiler/Nodes.py
+2
-5
No files found.
Cython/Compiler/Nodes.py
View file @
f21e5878
...
...
@@ -4709,19 +4709,16 @@ class InPlaceAssignmentNode(AssignmentNode):
self
.
lhs
.
analyse_target_declaration
(
env
)
def
analyse_types
(
self
,
env
):
import
ExprNodes
self
.
rhs
=
self
.
rhs
.
analyse_types
(
env
)
self
.
lhs
=
self
.
lhs
.
analyse_target_types
(
env
)
# When assigning to a fully indexed buffer or memoryview, coerce the rhs
if
(
isinstance
(
self
.
lhs
,
ExprNodes
.
IndexNode
)
and
if
(
self
.
lhs
.
is_subscript
and
(
self
.
lhs
.
memslice_index
or
self
.
lhs
.
is_buffer_access
)):
self
.
rhs
=
self
.
rhs
.
coerce_to
(
self
.
lhs
.
type
,
env
)
return
self
def
generate_execution_code
(
self
,
code
):
import
ExprNodes
self
.
rhs
.
generate_evaluation_code
(
code
)
self
.
lhs
.
generate_subexpr_evaluation_code
(
code
)
c_op
=
self
.
operator
...
...
@@ -4729,7 +4726,7 @@ class InPlaceAssignmentNode(AssignmentNode):
c_op
=
"/"
elif
c_op
==
"**"
:
error
(
self
.
pos
,
"No C inplace power operator"
)
if
isinstance
(
self
.
lhs
,
ExprNodes
.
IndexNode
)
and
self
.
lhs
.
is_buffer_access
:
if
self
.
lhs
.
is_subscript
and
self
.
lhs
.
is_buffer_access
:
if
self
.
lhs
.
type
.
is_pyobject
:
error
(
self
.
pos
,
"In-place operators not allowed on object buffers in this release."
)
if
(
c_op
in
(
'/'
,
'%'
)
and
self
.
lhs
.
type
.
is_int
...
...
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