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
Kirill Smelkov
cython
Commits
db5b10dc
Commit
db5b10dc
authored
Jul 26, 2014
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
A couple const cleanups.
parent
4f015d5f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
9 deletions
+5
-9
Cython/Utility/CppConvert.pyx
Cython/Utility/CppConvert.pyx
+5
-9
No files found.
Cython/Utility/CppConvert.pyx
View file @
db5b10dc
...
@@ -27,7 +27,7 @@ cdef extern from *:
...
@@ -27,7 +27,7 @@ cdef extern from *:
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