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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
a192940f
Commit
a192940f
authored
Sep 18, 2020
by
Xavier Thompson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Generate const-correct cpp iterations when possible
parent
927a7dbf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
Cython/Compiler/ExprNodes.py
Cython/Compiler/ExprNodes.py
+10
-2
No files found.
Cython/Compiler/ExprNodes.py
View file @
a192940f
...
...
@@ -2878,8 +2878,16 @@ class CppIteratorNode(ExprNode):
sequence_type
=
self
.
sequence
.
type
if
sequence_type
.
is_ptr
:
sequence_type
=
sequence_type
.
base_type
begin
=
sequence_type
.
scope
.
lookup
(
"begin"
)
end
=
sequence_type
.
scope
.
lookup
(
"end"
)
if
sequence_type
.
is_const
or
sequence_type
.
is_const_cyp_class
:
begin
=
sequence_type
.
scope
.
lookup
(
"const_begin"
)
end
=
sequence_type
.
scope
.
lookup
(
"const_end"
)
if
not
begin
or
begin
.
cname
!=
"begin"
:
begin
=
sequence_type
.
scope
.
lookup
(
"begin"
)
if
not
end
or
end
.
cname
!=
"end"
:
end
=
sequence_type
.
scope
.
lookup
(
"end"
)
else
:
begin
=
sequence_type
.
scope
.
lookup
(
"begin"
)
end
=
sequence_type
.
scope
.
lookup
(
"end"
)
if
(
begin
is
None
or
not
begin
.
type
.
is_cfunction
or
begin
.
type
.
args
):
...
...
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