summaryrefslogtreecommitdiffstats
path: root/Objects/unicodeobject.c
diff options
context:
space:
mode:
authorMarc-André Lemburg <mal@egenix.com>2002-02-06 18:20:19 (GMT)
committerMarc-André Lemburg <mal@egenix.com>2002-02-06 18:20:19 (GMT)
commitdc724d6e35aaf76a291f4b17b59516adcf3c9e98 (patch)
tree08204be36b7d107ed74cb89c192f591eae229671 /Objects/unicodeobject.c
parente7c6ee4b8a9b7e043d507b85b99148a397c996d9 (diff)
downloadcpython-dc724d6e35aaf76a291f4b17b59516adcf3c9e98.zip
cpython-dc724d6e35aaf76a291f4b17b59516adcf3c9e98.tar.gz
cpython-dc724d6e35aaf76a291f4b17b59516adcf3c9e98.tar.bz2
Cosmetics.
Diffstat (limited to 'Objects/unicodeobject.c')
-rw-r--r--Objects/unicodeobject.c12
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;
}
}