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
7c8b08e0
Commit
7c8b08e0
authored
Apr 14, 2016
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ignore optional type parameters when comparing cpp classes.
This posed an issue when the type parameter was a typedef.
parent
2a34dd23
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
0 deletions
+12
-0
Cython/Compiler/PyrexTypes.py
Cython/Compiler/PyrexTypes.py
+2
-0
tests/run/cpp_stl.pyx
tests/run/cpp_stl.pyx
+10
-0
No files found.
Cython/Compiler/PyrexTypes.py
View file @
7c8b08e0
...
...
@@ -3675,6 +3675,8 @@ class CppClassType(CType):
if
self
.
templates
==
other_type
.
templates
:
return
1
for
t1
,
t2
in
zip
(
self
.
templates
,
other_type
.
templates
):
if
is_optional_template_param
(
t1
)
and
is_optional_template_param
(
t2
):
break
if
not
t1
.
same_as_resolved_type
(
t2
):
return
0
return
1
...
...
tests/run/cpp_stl.pyx
View file @
7c8b08e0
...
...
@@ -37,6 +37,16 @@ def test_vector(L):
print
v
.
at
(
i
)
del
v
ctypedef
int
my_int
def
test_vector_typedef
(
L
):
"""
>>> test_vector_typedef([1, 2, 3])
[1, 2, 3]
"""
cdef
vector
[
my_int
]
v
=
L
cdef
vector
[
int
]
vv
=
v
return
vv
def
test_vector_iterator
(
L
):
"""
>>> test_vector([11, 37, 389, 5077])
...
...
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