On 17 February 2011 10:44, W. Trevor King <wk...@drexel.edu> wrote: > On Thu, Feb 17, 2011 at 08:29:41AM -0500, W. Trevor King wrote: >> cpdef struct Foo: >> cpdef public int intA >> cpdef readonly int intB >> cdef void *ptr > > Oops, for consistency with classes, the variables declarations should > read `cdef public` and and `cdef readonly`. Perhaps `cdef struct` > too, to match `cdef class`? > > I get a bit confused, because for some things (functions, methods) > `cpdef` adds a Python interface. For others (attributes) it's `cdef > public/readonly`. There are even some things (classes), where a plain > `cdef` is enough to provide a Python interface. Perhaps I am just > missing some subtle distinction between the effects of the various > incantations? >
Cython could certainly support "cpdef struct", it is just a matter to define a proposal and find a contributor to implement it :-) -- Lisandro Dalcin --------------- CIMEC (INTEC/CONICET-UNL) Predio CONICET-Santa Fe Colectora RN 168 Km 472, Paraje El Pozo 3000 Santa Fe, Argentina Tel: +54-342-4511594 (ext 1011) Tel/Fax: +54-342-4511169 _______________________________________________ Cython-dev mailing list Cython-dev@codespeak.net http://codespeak.net/mailman/listinfo/cython-dev