[Cython] cython-devel: array declaration problems with current trunk
Dag Sverre Seljebotn
dagss at student.matnat.uio.no
Mon Aug 4 20:46:04 CEST 2008
Lisandro Dalcin wrote:
> Current cython-devel trunk broke my code, for example, try to run
> cython on this snippet:
>
> cdef extern from *:
>
> cdef void foo(int[])
>
> ctypedef int MyInt
> cdef void foo(MyInt[])
>
> struct MyStruct:
> pass
> cdef void bar(MyStruct[])
>
> ctypedef MyStruct* MyStructP
> cdef void baz(MyStructP[])
>
>
> I get error messages like (just the first shown):
>
> Error converting Pyrex file to C:
> ------------------------------------------------------------
> ...
> cdef extern from *:
>
> cdef void foo(int[])
>
> ctypedef int MyInt
> cdef void foo(MyInt[])
> ^
> ------------------------------------------------------------
>
> /u/dalcinl/Devel/Cython/sandbox/arrdecl.pyx:6:23: Buffer types only
> allowed as function local variables
>
OK this is fixed now. Apologies.
(The fix rules out empty [] for buffer access, but this fits in with the
latest buffer discussion of "auto-acquire if enough defaults are
provided".).
--
Dag Sverre
More information about the Cython-dev
mailing list