[New-bugs-announce] [issue4129] C/API documentation: request for documentation of change to Py_ssize_t* arguments.

Jakob Schiøtz report at bugs.python.org
Wed Oct 15 13:16:16 CEST 2008


New submission from Jakob Schiøtz <schiotz at fysik.dtu.dk>:

In general, the Python C/API manual is very careful to document when
changes have occurred in the API, this is really useful information when
writing portable extension modules to be used with different Python
versions.

However, there is a group of changes that are not documented.  In Python
2.5 the Py_ssize_t type was introduced, and a number of functions had
arguments changed from int to Py_ssize_t (a trivial change) or from int*
to Py_ssize_t*.  The latter is an incompatible change on 64-bit
platforms, as int and Py_ssize_t have different size, and this DOES
break extension modules on 64-bit platforms.  For example, the change in
int PySlice_GetIndices breaks the Scientific Python NetCDF module badly.

I suggest that a note is added to the documentation of all functions
taking a Py_ssize_t* argument stating that the type of the argument was
changed in Python 2.5.

Best regards

Jakob

----------
assignee: georg.brandl
components: Documentation
messages: 74801
nosy: georg.brandl, schiotz
severity: normal
status: open
title: C/API documentation: request for documentation of change to Py_ssize_t* arguments.
type: feature request
versions: Python 2.6

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4129>
_______________________________________


More information about the New-bugs-announce mailing list