mirror of
https://github.com/python/cpython.git
synced 2024-11-30 13:24:13 +08:00
simplify Py_UCSN definitions with stdint types
This commit is contained in:
parent
207116b84c
commit
a13e367778
@ -113,21 +113,9 @@ typedef wchar_t Py_UNICODE;
|
||||
|
||||
/* Py_UCS4 and Py_UCS2 are typedefs for the respective
|
||||
unicode representations. */
|
||||
#if SIZEOF_INT == 4
|
||||
typedef unsigned int Py_UCS4;
|
||||
#elif SIZEOF_LONG == 4
|
||||
typedef unsigned long Py_UCS4;
|
||||
#else
|
||||
#error "Could not find a proper typedef for Py_UCS4"
|
||||
#endif
|
||||
|
||||
#if SIZEOF_SHORT == 2
|
||||
typedef unsigned short Py_UCS2;
|
||||
#else
|
||||
#error "Could not find a proper typedef for Py_UCS2"
|
||||
#endif
|
||||
|
||||
typedef unsigned char Py_UCS1;
|
||||
typedef uint32_t Py_UCS4;
|
||||
typedef uint16_t Py_UCS2;
|
||||
typedef uint8_t Py_UCS1;
|
||||
|
||||
/* --- Internal Unicode Operations ---------------------------------------- */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user