[Python-checkins] r41971 - in python/branches/ssize_t: Include/abstract.hInclude/stringobject.hObjects/classobject.c Objects/enumobject.cObjects/iterobject.cObjects/setobject.c Objects/typeobject.c Objects/weakrefobject.c Python/pystrtod.c

M.-A. Lemburg mal at egenix.com
Tue Jan 10 10:21:22 CET 2006


Martin v. Löwis wrote:
> M.-A. Lemburg wrote:
>> Changes like these (variables passed in by reference) should be
>> handle more carefully and also discussed on python-dev.
> 
> The change was discussed on python-dev; it is part of the PEP
> (which still awaits a number).
> 
> Notice that the change is in the ssize_t-branch only so far.

I know that it's only in the branch, but the branch will eventually
get merged into the trunk.

I saw the short discussion on python-dev about the PyArg_ParseTuple()
problems, but it did not touch the issue of other output parameter
API changes.

I've posted such a message now, to see what others think.

>> The reason is that these changes will introduce major changes
>> in extensions using these APIs.
> 
> I don't believe the change is major. It only affects a few extensions,
> and for these, it is only a minor change. A single line of changing
> will be enough.

This is true for all the changes related to parameters passed by
value. It is not true for output parameters. For these, the
change will propagate into the extension and make quite a few
changes necessary (for the same reason you have to change
so many variables to Py_ssize_t).

We should make it possible to have a simple recompile of old
extensions continue to work with Python 2.5 (albeit without
them supporting 64-bit indexes) and without introducing
segfaults or buffer overflows that way.

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, Jan 10 2006)
>>> Python/Zope Consulting and Support ...        http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ...             http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/
________________________________________________________________________

::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::


More information about the Python-checkins mailing list