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

Testcase for C array inplace operators

parent de6dcfae
......@@ -7,6 +7,9 @@ __doc__ = u"""
>>> h(56, 7)
105.0
>>> arrays()
19
"""
def f(a,b):
......@@ -26,3 +29,16 @@ def h(double a, double b):
a += b
a *= b
return a
cimport stdlib
def arrays():
cdef char* buf = <char*>stdlib.malloc(10)
cdef int i = 2
cdef object j = 2
buf[2] = 0
buf[i] += 2
buf[2] *= 10
buf[j] -= 1
print buf[2]
stdlib.free(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