[Python-Dev] Documenting the ssize_t Python C API changes

"Martin v. Löwis" martin at v.loewis.de
Mon Mar 20 23:48:33 CET 2006

M.-A. Lemburg wrote:
> It's not a waste of time at all: you'd be helping lots and
> lots of developers out there who want to fix their extensions.

This is free software, anybody is free to decide what they do.
I don't believe that developers would be helped a lot - they
can easily search for Py_ssize_t in the header files, and
find all the APIs that have changed.

However, they *should* not have to do that. Instead, they
should look at it from a conceptual point of view: Does
that variable "count" something (memory, number of elements,
size of some structure). If it does, and it currently counts
that using an int, it should be changed to use a Py_ssize_t

So just review all occurrences of int in your code, and you
are done. No need to look at API lists.

> The ssize_t patch is the single most disruptive patch in
> Python 2.5, so it deserves special attention.

I can believe you that you would have preferred not to see
that patch at all, not at this time, and preferably never.
I have a different view. I don't see it as a problem, but
as a solution.

Again, if you think the documentation should be improved,
go ahead and improve it.


More information about the Python-Dev mailing list