Cython has moved to github.

cython-devel

view tests/run/r_vree_1.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 6309e21af543
children 24bd77ad030e
line source
1 __doc__ = """# disabled in Py3
2 >>> test(0)
3 0L
4 >>> test(1)
5 1L
7 >>> import sys
8 >>> sys.maxint + 1 > sys.maxint
9 True
10 >>> type(sys.maxint * 2 + 1) is long
11 True
13 >>> test(sys.maxint + 1) == sys.maxint + 1
14 True
15 >>> test(sys.maxint * 2 + 1) == sys.maxint * 2 + 1
16 True
18 >>> test(256 ** unsigned_long_size() - 1) > 0
19 True
20 >>> test(256 ** unsigned_long_size() - 1) > sys.maxint
21 True
22 """
24 def test(k):
25 cdef unsigned long m
26 m = k
27 return m
29 def unsigned_long_size():
30 return sizeof(unsigned long)