On Mar 19, 2009, at 6:57 AM, Lisandro Dalcin wrote: > On Thu, Mar 19, 2009 at 3:18 AM, Robert Bradshaw > <[email protected]> wrote: >>> >>> But an anon enum has no name! >> >> Oh, now I see what you're asking about. Yes, let's just return "int" >> in this special case. >> > > Let's leave this for the time I restart my work on C<->Py conversions > of integral types... > > Anon enums are currently the only way to enforce "constness" on > external declararions... I have fear of braking user code. > > This is yet other more thing we have to improve... "const" keyword > should be accepted and handled at least in external declarations, in > such a way that we can write > > cdef extern from ""someheader.h" > const long LONG_MAX > const size_t SIZEOF_SOMETHING > const double PI > > or perhaps: > > cdef extern from ""someheader.h" > const: > long LONG_MAX > size_t SIZEOF_SOMETHING > double PI > > Unfortunately, I doubt I could implement this myself...
Yes, this is an oft requested feature. http://trac.cython.org/cython_trac/ticket/246 - Robert _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
