Commit 4388e681 authored by Robert Bradshaw's avatar Robert Bradshaw

Test taking address of reference value.

parent 4d115ea6
......@@ -126,3 +126,13 @@ def nogil_test(L):
return v.size()
finally:
del v
def item_ptr_test(L, int i, int x):
"""
>>> item_ptr_test(range(10), 7, 100)
[0, 1, 2, 3, 4, 5, 6, 100, 8, 9]
"""
cdef vector[int] v = L
cdef int* vi_ptr = &v[i]
vi_ptr[0] = x
return v
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment