summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2016-09-08 18:38:28 (GMT)
committerBenjamin Peterson <benjamin@python.org>2016-09-08 18:38:28 (GMT)
commita13e367778d64b321bce8e6b39f9e679b24b9afe (patch)
tree2a66fe848199ca169d708c903faff70a5dab776f /Include
parent207116b84c24ab58f6f95df059474605b2b06fb2 (diff)
downloadcpython-a13e367778d64b321bce8e6b39f9e679b24b9afe.zip
cpython-a13e367778d64b321bce8e6b39f9e679b24b9afe.tar.gz
cpython-a13e367778d64b321bce8e6b39f9e679b24b9afe.tar.bz2
simplify Py_UCSN definitions with stdint types
Diffstat (limited to 'Include')
-rw-r--r--Include/unicodeobject.h18
1 files changed, 3 insertions, 15 deletions
diff --git a/Include/unicodeobject.h b/Include/unicodeobject.h
index 1933ad1..bcd1aad 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 ---------------------------------------- */