Lisandro Dalcin, 26.04.2010 01:41:
> On 25 April 2010 02:40, Stefan Behnel wrote:
>>>>
>>>> My vote is in favor of simply always making "ssize_t" in Cython always
>>>> mean Py_ssize_t in C.
>>>>
>>>
>>> This sounds very reasonable to me.
>>
>> +1. If CPython defines one as the other anyway,
>
> Yes, but only if the ssize_t is available.
>
>> it won't make a difference
>> in Py2.5+, and older Python versions a) have 64 bit issues anyway and b)
>> are already out of maintenance and thus will die out rather sooner than 
>> later.
>
> Other way I would not object so strongly is that ssize_t in Cython
> code actually emit Py_ssize_t in C code.

That's what I meant. CPython already does the checking for us and defines 
Py_ssize_t as ssize_t if it's there. If it's not there, Py_ssize_t will 
still have the right type, regardless of any additional definitions at C 
compile time, and guaranteed to be compatible with them.


> Or perhaps better, invent our own __Pyx_ssize_t, and then:
>
> #ifndef __Pyx_ssize_t
> #define __Pyx_ssize_t Py_ssize_t
> #endif

-1, Py_ssize_t already does that for us, so that would just add another 
level of superfluous indirection.

Stefan
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to