From: Stefan Behnel Date: Wed, 11 Jun 2008 18:14:35 +0000 (+0200) Subject: added test case from Pyrex rev 96 X-Git-Tag: 0.9.8rc1~11^2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=10bc414d7eaa90d28973dd06611175ff4e75c3d3;p=cython.git added test case from Pyrex rev 96 --- diff --git a/tests/run/r_uintindex.pyx b/tests/run/r_uintindex.pyx new file mode 100644 index 00000000..977071ed --- /dev/null +++ b/tests/run/r_uintindex.pyx @@ -0,0 +1,16 @@ +__doc__ = u""" +>>> print idx_uint( ["buckle", "my", "shoe"], 2) +shoe +>>> print idx_ulong(["buckle", "my", "shoe"], 2) +shoe +""" + +def idx_ulong(seq, i): + cdef unsigned long u + u = i + return seq[u] + +def idx_uint(seq, i): + cdef unsigned int u + u = i + return seq[u]