Commit 7c8bbbbb authored by Victor Stinner's avatar Victor Stinner

Ensure that Py_UCS4 is 32 bits and Py_UCS2 is 16 bits

parent 46606ce8
...@@ -117,15 +117,20 @@ typedef wchar_t Py_UNICODE; ...@@ -117,15 +117,20 @@ typedef wchar_t Py_UNICODE;
/* Py_UCS4 and Py_UCS2 are typedefs for the respective /* Py_UCS4 and Py_UCS2 are typedefs for the respective
unicode representations. */ unicode representations. */
#if SIZEOF_INT >= 4 #if SIZEOF_INT == 4
typedef unsigned int Py_UCS4; typedef unsigned int Py_UCS4;
#elif SIZEOF_LONG >= 4 #elif SIZEOF_LONG == 4
typedef unsigned long Py_UCS4; typedef unsigned long Py_UCS4;
#else #else
#error "Could not find a proper typedef for Py_UCS4" #error "Could not find a proper typedef for Py_UCS4"
#endif #endif
#if SIZEOF_SHORT == 2
typedef unsigned short Py_UCS2; typedef unsigned short Py_UCS2;
#else
#error "Could not find a proper typedef for Py_UCS2"
#endif
typedef unsigned char Py_UCS1; typedef unsigned char Py_UCS1;
/* --- Internal Unicode Operations ---------------------------------------- */ /* --- Internal Unicode Operations ---------------------------------------- */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment