On Fri, Apr 17, 2009 at 10:09 AM, Stefan Behnel <[email protected]> wrote: > > ... and that's a feature request, it would be nice to make that work. > Could you create two tickets for those? >
Mmm... we will have to have care here... In Py3k, nb_long was renamed to nb_reserved (moreover, now it is a bare void* pointer). So, In Py3k, if a class only defines one of __int__() or __long__(), Cython should generate code filling the 'nb_int' slot, and put a NULL in 'nb_reserved'. What I do not know is what to do if a class defines both special methods... Also note that the in implementation of __Pyx_PyNumber_Int() (from my patch for C-int conversion), "nb_long" takes precedence over "nb_int" in Python 2. IMHO, that was the best thing to do... -- 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
