[Python-Dev] New Py_UNICODE doc
Nicholas Bastin
nbastin at opnet.com
Wed May 4 19:19:34 CEST 2005
On May 4, 2005, at 1:02 PM, Michael Hudson wrote:
> Nicholas Bastin <nbastin at opnet.com> writes:
>
>> The current documentation for Py_UNICODE states:
>>
>> "This type represents a 16-bit unsigned storage type which is used by
>> Python internally as basis for holding Unicode ordinals. On platforms
>> where wchar_t is available and also has 16-bits, Py_UNICODE is a
>> typedef alias for wchar_t to enhance native platform compatibility.
>> On
>> all other platforms, Py_UNICODE is a typedef alias for unsigned
>> short."
>>
>> I propose changing this to:
>>
>> "This type represents the storage type which is used by Python
>> internally as the basis for holding Unicode ordinals. On platforms
>> where wchar_t is available, Py_UNICODE is a typedef alias for wchar_t
>> to enhance native platform compatibility.
>
> This just isn't true. Have you read ./configure --help recently?
Ok, so the above statement is true if the user does not set
--enable-unicode=ucs[24] (was reading the whar_t test in configure.in,
and not the generated configure help).
Alternatively, we shouldn't talk about the size at all, and just leave
the first and last sentences:
"This type represents the storage type which is used by Python
internally as the basis for holding Unicode ordinals. Extension module
developers should make no assumptions about the size of this type on
any given platform."
--
Nick
More information about the Python-Dev
mailing list