On Thu, Feb 26, 2009 at 9:21 PM, Robert Bradshaw
<[email protected]> wrote:
> It mostly looks good to me. To summarize, you basically made a macro
> that's the function for converting to/from the various types, and
> applied that everywhere, right?
Yes, though this is preliminary...
Perhaps I should make Cython emit the code directly?
Moreover, I need to review the Py_ssize_t/size_t converters..
However, I would like to point a gotcha... The some converters use
PyNumber_{Int|Long} ... This is good as they would exercise general
Python types implementing the special methods "__int__()" or
"__long__()" ... However, they will also accept strings, and even
(char) buffer objects !!!! What to do here ?? This makes me feel a bit
uncomfortable, seems too much ...
>
> In your tests, "1..." could catch 100 or anything like that, so I'm
> not sure if that's a concern.
>
Yes, know.. that was a quick hack for making the tests pass on Py2/Py3
(because of the "L" suffix on Py2's "long" instances)... I just forgot
to use "print" ....
> - Robert
>
> On Feb 26, 2009, at 3:41 PM, Lisandro Dalcin wrote:
>
>> Before going on, I would like to know your opinion... patch and
>> testcase attached ...
>>
>>
>> --
>> 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<numerictypes.pyx><NUMERICTYPES.diff>_____________________
>> __________________________
>> Cython-dev mailing list
>> [email protected]
>> http://codespeak.net/mailman/listinfo/cython-dev
>
> _______________________________________________
> Cython-dev mailing list
> [email protected]
> http://codespeak.net/mailman/listinfo/cython-dev
>
--
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