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
173d4156
Commit
173d4156
authored
Apr 20, 2018
by
Valentin Valls
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add const at to map
parent
f0043eb7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
0 deletions
+15
-0
Cython/Includes/libcpp/map.pxd
Cython/Includes/libcpp/map.pxd
+1
-0
tests/run/cpp_stl_cpp11.pyx
tests/run/cpp_stl_cpp11.pyx
+14
-0
No files found.
Cython/Includes/libcpp/map.pxd
View file @
173d4156
...
@@ -39,6 +39,7 @@ cdef extern from "<map>" namespace "std" nogil:
...
@@ -39,6 +39,7 @@ cdef extern from "<map>" namespace "std" nogil:
bint
operator
<=
(
map
&
,
map
&
)
bint
operator
<=
(
map
&
,
map
&
)
bint
operator
>=
(
map
&
,
map
&
)
bint
operator
>=
(
map
&
,
map
&
)
U
&
at
(
const
T
&
)
except
+
U
&
at
(
const
T
&
)
except
+
const
U
&
const_at
"at"
(
const
T
&
)
except
+
iterator
begin
()
iterator
begin
()
const_iterator
const_begin
"begin"
()
const_iterator
const_begin
"begin"
()
void
clear
()
void
clear
()
...
...
tests/run/cpp_stl_cpp11.pyx
View file @
173d4156
...
@@ -9,6 +9,7 @@ from libcpp.queue cimport queue
...
@@ -9,6 +9,7 @@ from libcpp.queue cimport queue
from
libcpp.queue
cimport
priority_queue
from
libcpp.queue
cimport
priority_queue
from
libcpp.vector
cimport
vector
from
libcpp.vector
cimport
vector
from
libcpp.pair
cimport
pair
from
libcpp.pair
cimport
pair
from
libcpp.map
cimport
map
def
test_vector_functionality
():
def
test_vector_functionality
():
...
@@ -58,6 +59,19 @@ def test_priority_queue_functionality():
...
@@ -58,6 +59,19 @@ def test_priority_queue_functionality():
return
"pass"
return
"pass"
def
test_map_functionality
():
"""
>>> test_map_functionality()
'pass'
"""
cdef
:
map
[
int
,
const
void
*
]
int_map
const
void
*
data
int_map
[
77
]
=
NULL
data
=
int_map
.
const_at
(
77
)
return
"pass"
def
test_unordered_map_functionality
():
def
test_unordered_map_functionality
():
"""
"""
>>> test_unordered_map_functionality()
>>> test_unordered_map_functionality()
...
...
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