On 25 April 2010 02:40, Stefan Behnel <[email protected]> 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.
>

I'm still not sure that defining ssize_t is a good idea. As the type
is missing, we can expect that other API's could also define it. Then
you #include a  header, and get conflicting definitions.

Other way I would not object so strongly is that ssize_t in Cython
code actually emit Py_ssize_t in C code. Or perhaps better, invent our
own __Pyx_ssize_t, and then:

#ifndef __Pyx_ssize_t
#define __Pyx_ssize_t Py_ssize_t
#endif

then people has a last chance to hack on our definition at C compile time.

What do you think about this?

-- 
Lisandro Dalcin
---------------
CIMEC (INTEC/CONICET-UNL)
Predio CONICET-Santa Fe
Colectora RN 168 Km 472, Paraje El Pozo
Tel: +54-342-4511594 (ext 1011)
Tel/Fax: +54-342-4511169
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to