diff options
author | Marc-André Lemburg <mal@egenix.com> | 2002-02-06 18:20:19 (GMT) |
---|---|---|
committer | Marc-André Lemburg <mal@egenix.com> | 2002-02-06 18:20:19 (GMT) |
commit | dc724d6e35aaf76a291f4b17b59516adcf3c9e98 (patch) | |
tree | 08204be36b7d107ed74cb89c192f591eae229671 /Objects/unicodeobject.c | |
parent | e7c6ee4b8a9b7e043d507b85b99148a397c996d9 (diff) | |
download | cpython-dc724d6e35aaf76a291f4b17b59516adcf3c9e98.zip cpython-dc724d6e35aaf76a291f4b17b59516adcf3c9e98.tar.gz cpython-dc724d6e35aaf76a291f4b17b59516adcf3c9e98.tar.bz2 |
Cosmetics.
Diffstat (limited to 'Objects/unicodeobject.c')
-rw-r--r-- | Objects/unicodeobject.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index a67caa3..fb9b81f 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -1191,8 +1191,8 @@ PyObject *PyUnicode_EncodeUTF8(const Py_UNICODE *s, } else if (ch < 0x0800) { - *p++ = 0xc0 | (ch >> 6); - *p++ = 0x80 | (ch & 0x3f); + *p++ = (char)(0xc0 | (ch >> 6)); + *p++ = (char)(0x80 | (ch & 0x3f)); cbWritten += 2; } @@ -1230,10 +1230,10 @@ PyObject *PyUnicode_EncodeUTF8(const Py_UNICODE *s, cbWritten += 3; } else { - *p++ = 0xf0 | (ch>>18); - *p++ = 0x80 | ((ch>>12) & 0x3f); - *p++ = 0x80 | ((ch>>6) & 0x3f); - *p++ = 0x80 | (ch & 0x3f); + *p++ = (char)(0xf0 | (ch>>18)); + *p++ = (char)(0x80 | ((ch>>12) & 0x3f)); + *p++ = (char)(0x80 | ((ch>>6) & 0x3f)); + *p++ = (char)(0x80 | (ch & 0x3f)); cbWritten += 4; } } |