Cython has moved to github.

cython-devel

view tests/run/ass2cglobal.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 612957ef6e8f
children
line source
1 __doc__ = u"""
2 >>> what()
3 0 5
4 >>> f(5)
5 >>> what()
6 42 5
7 >>> f(6)
8 >>> what()
9 42 6
10 >>> f("spam")
11 >>> what()
12 42 spam
13 """
15 cdef int i = 0
16 cdef x = 5
18 def f(a):
19 global i, x
20 i = 42
21 x = a
23 def what():
24 print i,x