[Python-Dev] Breaking undocumented API

Alexander Belopolsky alexander.belopolsky at gmail.com
Tue Nov 16 19:31:32 CET 2010


On Tue, Nov 16, 2010 at 1:06 PM, M.-A. Lemburg <mal at egenix.com> wrote:
..
> Now, we can't use a macro for [PyUnicode_GetMax()], since the information has
> to be available as callable in order to applications or extensions
> to use it (without recompile).
>

.. but it *is* a macro resolving to either PyUnicodeUCS2_GetMax or
PyUnicodeUCS4_GetMax.  What is the scenario when may want to change
what PyUnicodeUCS?_GetMax return and have extensions pick up the
change without a recompile? UCS2 case will certainly never change
since it is already 0xFFFF.  Is it possible that USC4 will be expanded
beyond 0x10FFFF?  Note that we can have both a macro and a function
version.  This is fairly standard practice in Python C-API.


More information about the Python-Dev mailing list