[Python-checkins] cpython: Use Py_UCS1 instead of unsigned char in unicodeobject.h
victor.stinner
python-checkins at python.org
Sun Oct 2 01:14:18 CEST 2011
http://hg.python.org/cpython/rev/5231de1080b0
changeset: 72577:5231de1080b0
user: Victor Stinner <victor.stinner at haypocalc.com>
date: Sun Oct 02 00:55:25 2011 +0200
summary:
Use Py_UCS1 instead of unsigned char in unicodeobject.h
files:
Include/unicodeobject.h | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Include/unicodeobject.h b/Include/unicodeobject.h
--- a/Include/unicodeobject.h
+++ b/Include/unicodeobject.h
@@ -417,7 +417,7 @@
#define PyUnicode_READ(kind, data, index) \
((Py_UCS4) \
((kind) == PyUnicode_1BYTE_KIND ? \
- ((const unsigned char *)(data))[(index)] : \
+ ((const Py_UCS1 *)(data))[(index)] : \
((kind) == PyUnicode_2BYTE_KIND ? \
((const Py_UCS2 *)(data))[(index)] : \
((const Py_UCS4 *)(data))[(index)] \
@@ -431,7 +431,7 @@
#define PyUnicode_READ_CHAR(unicode, index) \
((Py_UCS4) \
(PyUnicode_KIND((unicode)) == PyUnicode_1BYTE_KIND ? \
- ((const unsigned char *)(PyUnicode_DATA((unicode))))[(index)] : \
+ ((const Py_UCS1 *)(PyUnicode_DATA((unicode))))[(index)] : \
(PyUnicode_KIND((unicode)) == PyUnicode_2BYTE_KIND ? \
((const Py_UCS2 *)(PyUnicode_DATA((unicode))))[(index)] : \
((const Py_UCS4 *)(PyUnicode_DATA((unicode))))[(index)] \
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list