mirror of
https://github.com/python/cpython.git
synced 2025-08-22 17:55:18 +00:00
Bill Tutt: Added Py_UCS4 typedef to hold UCS4 values (these need
at least 32 bits as opposed to Py_UNICODE which rely on having 16 bits).
This commit is contained in:
parent
e4dbb86ab8
commit
43279100f4
1 changed files with 11 additions and 0 deletions
|
@ -107,6 +107,17 @@ typedef unsigned short Py_UNICODE;
|
|||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Use this typedef when you need to represent a UTF-16 surrogate pair
|
||||
* as single unsigned integer.
|
||||
*/
|
||||
#if SIZEOF_INT >= 4
|
||||
typedef unsigned int Py_UCS4;
|
||||
#elif SIZEOF_LONG >= 4
|
||||
typedef unsigned long Py_UCS4;
|
||||
#endif
|
||||
|
||||
|
||||
/* --- Internal Unicode Operations ---------------------------------------- */
|
||||
|
||||
/* If you want Python to use the compiler's wctype.h functions instead
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue