From: Stefan Behnel Date: Fri, 11 Jul 2008 16:21:42 +0000 (+0200) Subject: test for C arrays and their declaration X-Git-Tag: 0.9.8.1~123^2~9 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=a39c09ce8f439814bc3f8e4f4d43e1c77c569ab1;p=cython.git test for C arrays and their declaration --- diff --git a/tests/run/carrays.pyx b/tests/run/carrays.pyx new file mode 100644 index 00000000..3a7e4537 --- /dev/null +++ b/tests/run/carrays.pyx @@ -0,0 +1,15 @@ +__doc__ = """ +>>> test() +2 +""" + +def test(): + cdef int x[2][2] + x[0][0] = 1 + x[0][1] = 2 + x[1][0] = 3 + x[1][1] = 4 + return f(x)[1] + +cdef int* f(int x[2][2]): + return x[0]