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
8358831b
Commit
8358831b
authored
Jul 27, 2014
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Plain Diff
merge
parents
09a9be1d
93ed6796
Changes
1
Show 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 *:
...
@@ -21,13 +21,13 @@ cdef string {{cname}}(object o) except *:
#cimport cython
#cimport cython
#from libcpp.string cimport string
#from libcpp.string cimport string
cdef
extern
from
*
:
cdef
extern
from
*
:
cdef
cppclass
string
"
const
std::string"
:
cdef
cppclass
string
"std::string"
:
char
*
data
()
char
*
data
()
size_t
size
()
size_t
size
()
cdef
object
__Pyx_PyObject_FromStringAndSize
(
char
*
,
size_t
)
cdef
object
__Pyx_PyObject_FromStringAndSize
(
char
*
,
size_t
)
@
cname
(
"{{cname}}"
)
@
cname
(
"{{cname}}"
)
cdef
object
{{
cname
}}(
string
&
s
):
cdef
object
{{
cname
}}(
const
string
&
s
):
return
__Pyx_PyObject_FromStringAndSize
(
s
.
data
(),
s
.
size
())
return
__Pyx_PyObject_FromStringAndSize
(
s
.
data
(),
s
.
size
())
...
@@ -91,11 +91,9 @@ cdef extern from *:
...
@@ -91,11 +91,9 @@ cdef extern from *:
bint
operator
!=
(
const_iterator
)
bint
operator
!=
(
const_iterator
)
const_iterator
begin
()
const_iterator
begin
()
const_iterator
end
()
const_iterator
end
()
cdef
cppclass
const_cpp_list
"const std::list"
[
T
]
(
cpp_list
):
pass
@
cname
(
"{{cname}}"
)
@
cname
(
"{{cname}}"
)
cdef
object
{{
cname
}}(
const
_
cpp_list
[
X
]
&
v
):
cdef
object
{{
cname
}}(
const
cpp_list
[
X
]
&
v
):
o
=
[]
o
=
[]
cdef
cpp_list
[
X
].
const_iterator
iter
=
v
.
begin
()
cdef
cpp_list
[
X
].
const_iterator
iter
=
v
.
begin
()
while
iter
!=
v
.
end
():
while
iter
!=
v
.
end
():
...
@@ -134,11 +132,9 @@ cdef extern from *:
...
@@ -134,11 +132,9 @@ cdef extern from *:
bint
operator
!=
(
const_iterator
)
bint
operator
!=
(
const_iterator
)
const_iterator
begin
()
const_iterator
begin
()
const_iterator
end
()
const_iterator
end
()
cdef
cppclass
const_cpp_set
"const std::{{maybe_unordered}}set"
[
T
](
cpp_set
):
pass
@
cname
(
"{{cname}}"
)
@
cname
(
"{{cname}}"
)
cdef
object
{{
cname
}}(
const
_
cpp_set
[
X
]
&
s
):
cdef
object
{{
cname
}}(
const
cpp_set
[
X
]
&
s
):
o
=
set
()
o
=
set
()
cdef
cpp_set
[
X
].
const_iterator
iter
=
s
.
begin
()
cdef
cpp_set
[
X
].
const_iterator
iter
=
s
.
begin
()
while
iter
!=
s
.
end
():
while
iter
!=
s
.
end
():
...
@@ -166,12 +162,12 @@ cdef pair[X,Y] {{cname}}(object o) except *:
...
@@ -166,12 +162,12 @@ cdef pair[X,Y] {{cname}}(object o) except *:
{{
template_type_declarations
}}
{{
template_type_declarations
}}
cdef
extern
from
*
:
cdef
extern
from
*
:
cdef
cppclass
pair
"
const
std::pair"
[
T
,
U
]:
cdef
cppclass
pair
"std::pair"
[
T
,
U
]:
T
first
T
first
U
second
U
second
@
cname
(
"{{cname}}"
)
@
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
)
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