Cython has moved to github.
cython-devel
view tests/run/addop.pyx @ 1622:4f0327bdebc9
test for temp allocation bug in call
| author | Robert Bradshaw <robertwb@math.washington.edu> |
|---|---|
| date | Sat Jan 17 01:25:34 2009 -0800 (3 years ago) |
| parents | cef4cce3d1b4 |
| children | 82d312a9f1fc |
line source
1 __doc__ = u"""
2 >>> f()
3 (30, 22)
4 """
6 def f():
7 cdef int int1, int2, int3
8 cdef char *ptr1, *ptr2 = "test", *ptr3 = "toast"
9 int2 = 10
10 int3 = 20
11 obj1 = 1
12 obj2 = 2
13 obj3 = 3
14 int1 = int2 + int3
15 ptr1 = ptr2 + int3
16 ptr1 = int2 + ptr3
17 obj1 = obj2 + int3
18 return int1, obj1
