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
3cf1d712
Commit
3cf1d712
authored
Oct 04, 2010
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test for broken reference coercion - #581.
parent
e4a3fd74
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
tests/run/libcpp_all.pyx
tests/run/libcpp_all.pyx
+12
-0
No files found.
tests/run/libcpp_all.pyx
View file @
3cf1d712
...
...
@@ -53,3 +53,15 @@ cdef vector[int].iterator iv1 = v1.begin()
cdef
vector
[
int
].
iterator
iv2
=
v1
.
end
()
cdef
vector
[
int
].
reverse_iterator
riv1
=
v1
.
rbegin
()
cdef
vector
[
int
].
reverse_iterator
riv2
=
v1
.
rend
()
def
test_vector_coercion
(
*
args
):
"""
>>> test_vector_coercion(1.75)
[1.75]
>>> test_vector_coercion(1, 10, 100)
[1.0, 10.0, 100.0]
"""
v
=
new
vector
[
double
]()
for
a
in
args
:
v
.
push_back
(
a
)
return
[
v
[
0
][
i
]
for
i
in
range
(
v
.
size
())]
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