cross-platform c questions

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Wed Nov 14 19:39:37 EST 2007


En Wed, 14 Nov 2007 20:49:35 -0300, Martin v. Löwis <martin at v.loewis.de>  
escribió:

>> Is there any rules/criteria to decide when to use Py_ssize_t, int, or
>> long? I've seen them somewhat mixed and don't know when exactly to use
>> Py_ssize_t.
>
> You should use Py_ssize_t when you are counting things, and when there
> is no small limit (e.g. 66536) to the maximum number of things you can
> have. More precisely, you should use it if the maximum number of things
> you could possibly have correlates to the available address space.

It's perfectly clear now, thanks!

-- 
Gabriel Genellina




More information about the Python-list mailing list