On Thu, May 14, 2009 at 11:55 AM, Dag Sverre Seljebotn <[email protected]> wrote: > > I just added a "typedef_is_external" to CTypedefType which could be useful. > > If one renamed this to simply "is_external" (or "lacks_size"?) and > defaulted it to 0 on all types, then the result would be that one could > simply always query on a conversion whether the type "lacked size", and > if so use custom converter functions. > > Does that solve it? >
That would help a lot. I'll try to dive further on this. >> For (B), I believe that if the type is an external typedef, a >> transform should change the "cdef publid footype value" to this: >> >> cdef class A: >> property value: >> def __get__(self): return self.value >> def __set__(self, footype x) : self.value = x >> >> In short, I already have implemented the utility code for (A), but I'm >> in doubt about how to reimplement CTypedefNode. Additionally, I >> believe my appoach for (B) could be easily implemented (likely Dag can >> implement this part far better than me). > > Splendid! This was basically already implemented (by Robert I think) to > support "cdef public MyCdefClass foo", so the patch was really easy. > > http://hg.cython.org/cython-devel/rev/dcc78ab6a498 > > -- Your patch looks good. BTW, further work on this would require to push my patch for #287. -- Lisandro Dalcín --------------- Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC) Instituto de Desarrollo Tecnológico para la Industria Química (INTEC) Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET) PTLC - Güemes 3450, (3000) Santa Fe, Argentina Tel/Fax: +54-(0)342-451.1594 _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
