From 10bc414d7eaa90d28973dd06611175ff4e75c3d3 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Wed, 11 Jun 2008 20:14:35 +0200 Subject: [PATCH] added test case from Pyrex rev 96 --- tests/run/r_uintindex.pyx | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 tests/run/r_uintindex.pyx 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] -- 2.26.2