mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
SF patch #438013 Remove 2-byte Py_UCS2 assumptions
Removed all instances of Py_UCS2 from the codebase, and so also (I hope) the last remaining reliance on the platform having an integral type with exactly 16 bits. PyUnicode_DecodeUTF16() and PyUnicode_EncodeUTF16() now read and write one byte at a time.
This commit is contained in:
parent
ab9ba27dc0
commit
772747b3f1
2 changed files with 91 additions and 83 deletions
|
@ -121,12 +121,6 @@ typedef unsigned int Py_UCS4;
|
|||
typedef unsigned long Py_UCS4;
|
||||
#endif
|
||||
|
||||
#if SIZEOF_SHORT == 2
|
||||
typedef unsigned short Py_UCS2;
|
||||
#else
|
||||
#error Cannot find a two-byte type
|
||||
#endif
|
||||
|
||||
typedef PY_UNICODE_TYPE Py_UNICODE;
|
||||
|
||||
/* --- UCS-2/UCS-4 Name Mangling ------------------------------------------ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue