[Python-Dev] [Python-3000] Stabilizing the C API of 2.6 and 3.0 (original) (raw)

Brett Cannon brett at python.org
Mon May 26 00:02:32 CEST 2008


On Sun, May 25, 2008 at 7:59 AM, Christian Heimes <lists at cheimes.de> wrote:

Hello!

The first set of betas of Python 2.6 and 3.0 is fast apace. I like to grab the final chance and clean up the C API of 2.6 and 3.0. I know, I know, I brought up the topic two times in the past. But this time I mean it for real! :] Last time Guido said: --- I think it can actually be simplified. I think maintaining binary compatibility between 2.6 and earlier versions is hopeless anyway, so we might as well just rename PyString to PyBytes in 2.6 and 3.0, and have an extra set of macros so that code using PyString needs to be recompiled but not otherwise touched. E.g. typedef { ... } PyBytesObject; #define PyStringObject PyBytesObject ... PyStringType; #define PyBytesType PyStringType --- I like to follow Guido's advice and change the code as following: * replace PyBytes with PyByteArray * replace PyString with PyBytes * rename bytesobject.[ch] to bytearrayobject.[ch] * rename stringobject.[ch] to bytesobject.[ch] * add a new file stringobject.h which contains the aliases PyString -> PyBytes

+1 from me.

-Brett



More information about the Python-Dev mailing list