Commit d4d80930 authored by Dag Sverre Seljebotn's avatar Dag Sverre Seljebotn

Test case for for-loop assignment to buffer

parent 4e6e24a2
......@@ -40,6 +40,17 @@ __doc__ = u"""
0 1 2 3 4 5
released A
#>>> forin_assignment([A, B, A], 3)
acquired A
3
released A
acquired B
3
released B
acquired A
3
released A
>>> printbuf_float(MockBuffer("f", [1.0, 1.25, 0.75, 1.0]), (4,))
acquired
1.0 1.25 0.75 1.0
......@@ -99,6 +110,11 @@ def cdef_assignment(obj, n):
print buf[i],
print
def forin_assignment(objs, int pick):
cdef object[int] buf
for buf in objs:
print buf[pick]
def printbuf_float(o, shape):
# should make shape builtin
cdef object[float] buf
......
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