[Python-Dev] [Python-checkins] r43041 - python/trunk/Modules/_ctypes/cfield.c

M.-A. Lemburg mal at egenix.com
Fri Mar 17 22:11:36 CET 2006

Thomas Heller wrote:
> Martin v. Löwis wrote:
>> M.-A. Lemburg wrote:
>>> I think it's only fair that I ask the patch authors to complete
>>> the PEP, since the ssize_t patch is causing extension authors
>>> enough trouble already.
>> Well, the PEP is complete as it stands. It's possible to provide
>> more guidelines, but the specification part of it says precisely
>> what I intend it to say. Also, the API documentation ought to
>> be in the Python documentation, and, for these changes, it is.
>>> If you want quick adoption of the changes, you have
>>> to make it as easy as possible for the authors to port their
>>> extensions to the new API. Otherwise, we'll end up having
>>> quite a large number of users who can't switch to Python 2.5
>>> simply because their favorite extensions don't work with it.
>> I don't see how giving a complete list of all changed functions
>> helps in any way.
> I'm not sure if this is what Marc-Andre means, but maybe these definitions
> could go into a new include file:
>   #if (PY_VERSION_HEX < 0x02050000)
>    typedef int Py_ssize_t;
>    #define lenfunc inquiry
>    #define readbufferproc getreadbufferproc
>    #define writebufferproc getwritebufferproc
>    #define segcountproc getsegcountproc
>    #define charbufferproc getcharbufferproc
>    #define ssizeargfunc intargfunc
>    #define ssizessizeargfunc intintargfunc
>    #define ssizeobjargproc intobjargproc
>    #define ssizessizeobjargproc intintobjargproc
>    ... more defines
>   #endif

I think it would be enough to have this code snippet (completed,
of course) in the PEP, so that authors can grab it and paste it
into their extensions header files.

Marc-Andre Lemburg

Professional Python Services directly from the Source  (#1, Mar 17 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-Dev mailing list