Robert Bradshaw wrote: > On May 14, 2009, at 7:55 AM, Dag Sverre Seljebotn wrote: > >> Lisandro Dalcin wrote: >>> 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", > > Yep. > >> so the patch was really easy. >> >> http://hg.cython.org/cython-devel/rev/dcc78ab6a498 > > Does this have a performance impact compared to the other way? It > does bloat the code some. (Maybe it's not critical anyways.)
Well, it is only used for external typedefs, and considering that the bug is quite critical (basically it's very easy to do *(long long*)&some_short)... Haven't benchmarked it, we could consider switching to my original proposal later..Lisandro, would you like to argue why you were -1? -- Dag Sverre _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
