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
8358831b
Commit
8358831b
authored
Jul 27, 2014
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Plain Diff
merge
parents
09a9be1d
93ed6796
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
10 deletions
+6
-10
Cython/Utility/CppConvert.pyx
Cython/Utility/CppConvert.pyx
+6
-10
No files found.
Cython/Utility/CppConvert.pyx
View file @
8358831b
...
...
@@ -21,13 +21,13 @@ cdef string {{cname}}(object o) except *:
#cimport cython
#from libcpp.string cimport string
cdef
extern
from
*
:
cdef
cppclass
string
"
const
std::string"
:
cdef
cppclass
string
"std::string"
:
char
*
data
()
size_t
size
()
cdef
object
__Pyx_PyObject_FromStringAndSize
(
char
*
,
size_t
)
@
cname
(
"{{cname}}"
)
cdef
object
{{
cname
}}(
string
&
s
):
cdef
object
{{
cname
}}(
const
string
&
s
):
return
__Pyx_PyObject_FromStringAndSize
(
s
.
data
(),
s
.
size
())
...
...
@@ -91,11 +91,9 @@ cdef extern from *:
bint
operator
!=
(
const_iterator
)
const_iterator
begin
()
const_iterator
end
()
cdef
cppclass
const_cpp_list
"const std::list"
[
T
]
(
cpp_list
):
pass
@
cname
(
"{{cname}}"
)
cdef
object
{{
cname
}}(
const
_
cpp_list
[
X
]
&
v
):
cdef
object
{{
cname
}}(
const
cpp_list
[
X
]
&
v
):
o
=
[]
cdef
cpp_list
[
X
].
const_iterator
iter
=
v
.
begin
()
while
iter
!=
v
.
end
():
...
...
@@ -134,11 +132,9 @@ cdef extern from *:
bint
operator
!=
(
const_iterator
)
const_iterator
begin
()
const_iterator
end
()
cdef
cppclass
const_cpp_set
"const std::{{maybe_unordered}}set"
[
T
](
cpp_set
):
pass
@
cname
(
"{{cname}}"
)
cdef
object
{{
cname
}}(
const
_
cpp_set
[
X
]
&
s
):
cdef
object
{{
cname
}}(
const
cpp_set
[
X
]
&
s
):
o
=
set
()
cdef
cpp_set
[
X
].
const_iterator
iter
=
s
.
begin
()
while
iter
!=
s
.
end
():
...
...
@@ -166,12 +162,12 @@ cdef pair[X,Y] {{cname}}(object o) except *:
{{
template_type_declarations
}}
cdef
extern
from
*
:
cdef
cppclass
pair
"
const
std::pair"
[
T
,
U
]:
cdef
cppclass
pair
"std::pair"
[
T
,
U
]:
T
first
U
second
@
cname
(
"{{cname}}"
)
cdef
object
{{
cname
}}(
pair
[
X
,
Y
]
&
p
):
cdef
object
{{
cname
}}(
const
pair
[
X
,
Y
]
&
p
):
return
X_to_py
(
p
.
first
),
Y_to_py
(
p
.
second
)
...
...
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