diff options
author | Georg Brandl <georg@python.org> | 2010-08-01 20:51:02 +0000 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2010-08-01 20:51:02 +0000 |
commit | 78eef3de8888ce3ec19529a7d780ad8281e672ea (patch) | |
tree | 45a2eabd82f6b32e31e3a6f389da7ce241c22559 /Objects/unicodeobject.c | |
parent | 7ffa196dce8db3010bce3e550078ed455a30e851 (diff) | |
download | cpython-git-78eef3de8888ce3ec19529a7d780ad8281e672ea.tar.gz |
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/unicodeobject.c')
-rw-r--r-- | Objects/unicodeobject.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index bfd19ebbbf..f2d666de12 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'; |