diff options
author | Georg Brandl <georg@python.org> | 2010-08-01 20:54:30 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2010-08-01 20:54:30 (GMT) |
commit | e27d044769166e47310345e7d538f54e1dac04d1 (patch) | |
tree | b533f04e3c7b8acfe8c908e3017dbdf434c30134 /Objects/unicodeobject.c | |
parent | 3970301e93ec3ab2e9a7a4c992d7056bea3ff9f6 (diff) | |
download | cpython-e27d044769166e47310345e7d538f54e1dac04d1.zip cpython-e27d044769166e47310345e7d538f54e1dac04d1.tar.gz cpython-e27d044769166e47310345e7d538f54e1dac04d1.tar.bz2 |
Recorded merge of revisions 83444 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r83444 | georg.brandl | 2010-08-01 22:51:02 +0200 (So, 01 Aug 2010) | 1 line
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 | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 42e0c9f..f373eeb 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -294,7 +294,7 @@ int unicode_resize(register PyUnicodeObject *unicode, } /* We allocate one more byte to make sure the string is - Ux0000 terminated -- XXX is this needed ? + Ux0000 terminated; some code relies on that. XXX This allocator could further be enhanced by assuring that the free list never reduces its size below 1. @@ -3067,7 +3067,7 @@ PyObject *unicodeescape_string(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'; @@ -3316,7 +3316,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'; |