cross-platform c questions

"Martin v. Löwis" martin at
Thu Nov 15 00:49:35 CET 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.


More information about the Python-list mailing list