Cython has moved to github.
cython-devel
view tests/run/exceptionpropagation.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 | |
| children | e52fce0091b1 |
line source
1 __doc__ = u"""
2 >>> foo(0)
3 >>> foo(1)
4 Traceback (most recent call last):
5 RuntimeError
6 """
8 cdef int CHKERR(int ierr) except -1:
9 if ierr==0: return 0
10 raise RuntimeError
12 cdef int obj2int(object ob) except *:
13 return ob
15 def foo(a):
16 cdef int i = obj2int(a)
17 CHKERR(i)
