Cython has moved to github.

cython-devel

view tests/run/slice_charptr.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 0310198e281e
line source
1 __doc__ = """
2 >>> do_slice("abcdef", 2, 3)
3 ('c', 'cdef', 'ab', 'abcdef')
4 >>> do_slice("abcdef", 0, 5)
5 ('abcde', 'abcdef', '', 'abcdef')
6 """
8 def do_slice(s, int i, int j):
9 cdef char* ss = s
10 return ss[i:j], ss[i:], ss[:i], ss[:]