cross-platform c questions

"Martin v. Löwis" martin at v.loewis.de
Wed Nov 14 18:49:35 EST 2007


> 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.

Regards,
Martin



More information about the Python-list mailing list