Issue 1044479: docs for Py_UNICODE are wrong (original) (raw)
Quoting the docs (Python C/API manual, section 7.3.2, unicode objects):
Py_UNICODE
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.
This is apparently wrong for wide unicode builds.