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
b74b9630
Commit
b74b9630
authored
Mar 10, 2016
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for stl conversions with default template params.
parent
364695bd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
4 deletions
+14
-4
Cython/Compiler/PyrexTypes.py
Cython/Compiler/PyrexTypes.py
+14
-4
No files found.
Cython/Compiler/PyrexTypes.py
View file @
b74b9630
...
...
@@ -3393,10 +3393,16 @@ class CStructOrUnionType(CType):
cpp_string_conversions
=
(
"std::string"
,)
builtin_cpp_conversions
=
(
"std::pair"
,
"std::vector"
,
"std::list"
,
"std::set"
,
"std::unordered_set"
,
"std::map"
,
"std::unordered_map"
)
builtin_cpp_conversions
=
{
# type element template params
"std::pair"
:
2
,
"std::vector"
:
1
,
"std::list"
:
1
,
"std::set"
:
1
,
"std::unordered_set"
:
1
,
"std::map"
:
2
,
"std::unordered_map"
:
2
,
}
class
CppClassType
(
CType
):
# name string
...
...
@@ -3445,6 +3451,8 @@ class CppClassType(CType):
tags
=
[]
declarations
=
[
"cdef extern from *:"
]
for
ix
,
T
in
enumerate
(
self
.
templates
or
[]):
if
ix
>=
builtin_cpp_conversions
[
self
.
cname
]:
break
if
T
.
is_pyobject
or
not
T
.
create_from_py_utility_code
(
env
):
return
False
tags
.
append
(
T
.
specialization_name
())
...
...
@@ -3507,6 +3515,8 @@ class CppClassType(CType):
tags
=
[]
declarations
=
[
"cdef extern from *:"
]
for
ix
,
T
in
enumerate
(
self
.
templates
or
[]):
if
ix
>=
builtin_cpp_conversions
[
self
.
cname
]:
break
if
not
T
.
create_to_py_utility_code
(
env
):
return
False
tags
.
append
(
T
.
specialization_name
())
...
...
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