summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2010-08-01 20:51:02 (GMT)
committerGeorg Brandl <georg@python.org>2010-08-01 20:51:02 (GMT)
commit78eef3de8888ce3ec19529a7d780ad8281e672ea (patch)
tree45a2eabd82f6b32e31e3a6f389da7ce241c22559 /Objects
parent7ffa196dce8db3010bce3e550078ed455a30e851 (diff)
downloadcpython-78eef3de8888ce3ec19529a7d780ad8281e672ea.zip
cpython-78eef3de8888ce3ec19529a7d780ad8281e672ea.tar.gz
cpython-78eef3de8888ce3ec19529a7d780ad8281e672ea.tar.bz2
Revert r83395, it introduces test failures and is not necessary anyway since we now have to nul-terminate the string anyway.
Diffstat (limited to 'Objects')
-rw-r--r--Objects/unicodeobject.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index bfd19eb..f2d666d 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -3734,7 +3734,7 @@ PyObject *PyUnicode_EncodeUnicodeEscape(const Py_UNICODE *s,
ch2 = *s++;
size--;
- if (ch2 >= 0xDC00 && ch2 <= 0xDFFF && size) {
+ if (ch2 >= 0xDC00 && ch2 <= 0xDFFF) {
ucs = (((ch & 0x03FF) << 10) | (ch2 & 0x03FF)) + 0x00010000;
*p++ = '\\';
*p++ = 'U';
@@ -3976,7 +3976,7 @@ PyObject *PyUnicode_EncodeRawUnicodeEscape(const Py_UNICODE *s,
ch2 = *s++;
size--;
- if (ch2 >= 0xDC00 && ch2 <= 0xDFFF && size) {
+ if (ch2 >= 0xDC00 && ch2 <= 0xDFFF) {
ucs = (((ch & 0x03FF) << 10) | (ch2 & 0x03FF)) + 0x00010000;
*p++ = '\\';
*p++ = 'U';