From: Benjamin Peterson Date: Thu, 8 Sep 2016 18:38:28 +0000 (-0700) Subject: simplify Py_UCSN definitions with stdint types X-Git-Tag: v3.6.0b1~265 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a13e367778d64b321bce8e6b39f9e679b24b9afe;p=thirdparty%2FPython%2Fcpython.git simplify Py_UCSN definitions with stdint types --- diff --git a/Include/unicodeobject.h b/Include/unicodeobject.h index 1933ad1b9b55..bcd1aad5597f 100644 --- a/Include/unicodeobject.h +++ b/Include/unicodeobject.h @@ -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 ---------------------------------------- */