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.
........
}
/* 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.
ch2 = *s++;
size--;
- if (ch2 >= 0xDC00 && ch2 <= 0xDFFF && size) {
+ if (ch2 >= 0xDC00 && ch2 <= 0xDFFF) {
ucs = (((ch & 0x03FF) << 10) | (ch2 & 0x03FF)) + 0x00010000;
*p++ = '\\';
*p++ = 'U';
ch2 = *s++;
size--;
- if (ch2 >= 0xDC00 && ch2 <= 0xDFFF && size) {
+ if (ch2 >= 0xDC00 && ch2 <= 0xDFFF) {
ucs = (((ch & 0x03FF) << 10) | (ch2 & 0x03FF)) + 0x00010000;
*p++ = '\\';
*p++ = 'U';