summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2010-08-01 20:54:22 (GMT)
committerGeorg Brandl <georg@python.org>2010-08-01 20:54:22 (GMT)
commit0f1470960cfef9f13a28dee7a81ca12d587a15b7 (patch)
treedbaba3b030ffc226f8b2645f54fae775d6cdc773 /Objects
parent1e2abe73222bf9b1721afa61fb8dde71aca154d0 (diff)
downloadcpython-0f1470960cfef9f13a28dee7a81ca12d587a15b7.zip
cpython-0f1470960cfef9f13a28dee7a81ca12d587a15b7.tar.gz
cpython-0f1470960cfef9f13a28dee7a81ca12d587a15b7.tar.bz2
Recorded merge of revisions 83444 via svnmerge from
svn+ssh://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')
-rw-r--r--Objects/unicodeobject.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index a18c571..199f34a 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -3597,7 +3597,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';
@@ -3839,7 +3839,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';