[Python-checkins] cpython: simplify Py_UCSN definitions with stdint types
benjamin.peterson
python-checkins at python.org
Thu Sep 8 14:44:33 EDT 2016
https://hg.python.org/cpython/rev/d1dace3c9871
changeset: 103339:d1dace3c9871
parent: 103333:5ffc6b528fb4
user: Benjamin Peterson <benjamin at python.org>
date: Thu Sep 08 11:38:28 2016 -0700
summary:
simplify Py_UCSN definitions with stdint types
files:
Include/unicodeobject.h | 18 +++---------------
1 files changed, 3 insertions(+), 15 deletions(-)
diff --git a/Include/unicodeobject.h b/Include/unicodeobject.h
--- a/Include/unicodeobject.h
+++ b/Include/unicodeobject.h
@@ -113,21 +113,9 @@
/* 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 ---------------------------------------- */
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list