[Python-Dev] PEP 393: Flexible String Representation

Stefan Behnel stefan_ml at behnel.de
Sat Jan 29 11:00:48 CET 2011


"Martin v. Löwis", 29.01.2011 10:05:
>>> None of the functions in this PEP become part of the stable ABI.
>>
>> I think that's only part of the truth. This PEP can potentially have an
>> impact on the stable ABI in the sense that the build-time size of
>> Py_UNICODE may no longer be important for extensions that work on
>> unicode buffers in the future as long as they only use the 'str' pointer
>> and not 'wstr'.
>
> Py_UNICODE isn't part of the stable ABI, so it wasn't important for
> extensions using the stable ABI before - so really no change here.

I know, that's not what I meant. But this PEP would enable a C API that 
provides direct access to the underlying buffer. Just as is currently 
provided for the Py_UNICODE array, but with a stable ABI because the buffer 
type won't change based on build time options.

OTOH, one could argue that this is already partly provided by the generic 
buffer API.

Stefan



More information about the Python-Dev mailing list