Cython has moved to github.

cython-devel

view tests/run/subop.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 585d725fe537
children 82d312a9f1fc
line source
1 __doc__ = u"""
2 >>> f()
3 (-1, -1)
4 >>> p()
5 0
6 """
8 def f():
9 cdef int int1, int2, int3
10 obj1 = 1
11 obj2 = 2
12 obj3 = 3
13 int2 = 2
14 int3 = 3
16 int1 = int2 - int3
17 obj1 = obj2 - int3
18 return int1, obj1
20 def p():
21 cdef int int1, int2, int3
22 cdef char *ptr1, *ptr2, *ptr3
23 int2 = 2
24 int3 = 3
25 ptr2 = "test"
26 ptr3 = ptr2
28 ptr1 = ptr2 - int3
29 int1 = ptr2 - ptr3
30 return int1