[Cython] array.array and PIL directly ?

Robert kxroberto at googlemail.com
Fri May 15 00:36:51 CEST 2009


Robert wrote:
> In array.pxd its just about a local in-place view (without need 
> for copy/instantiation of new objects)

BTW, why is it disallowed to enrich .pxd/cdef extern classes with 
new cdef member functions? as it is possible just by exception 
with __getbuffer__ ?

For example I wanted to put the copy_array() etc inline functions 
as class members..

even if the member function is declared inline like

cdef extern from "arrayarray.h":
     ctypedef class mod.xy[object xy]:
         ...
         cdef inline int f():
             return 1


there is still the error:

  "function definition in pxd file must be declared 'cdef inline'"



More information about the Cython-dev mailing list