Cython has moved to github.

cython-devel

view tests/run/nogil.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 c996baf06a23
children 67a370779b96
line source
1 __doc__ = u"""
2 >>> test(5)
3 47
4 >>> test(11)
5 53
6 """
8 def test(int x):
9 with nogil:
10 f(x)
11 x = g(x)
12 return x
14 cdef void f(int x) nogil:
15 cdef int y
16 y = x + 42
17 g(y)
19 cdef int g(int x) nogil:
20 cdef int y
21 y = x + 42
22 return y