[Python-checkins] r82984 - in python/branches/release26-maint: Lib/test/test_unicode.py Objects/unicodeobject.c
stefan.krah
python-checkins at python.org
Mon Jul 19 20:24:18 CEST 2010
Author: stefan.krah
Date: Mon Jul 19 20:24:18 2010
New Revision: 82984
Log:
Merged revisions 82980 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/release27-maint
........
r82980 | stefan.krah | 2010-07-19 20:06:46 +0200 (Mon, 19 Jul 2010) | 3 lines
Sub-issue of #9036: Fix incorrect use of Py_CHARMASK.
........
Modified:
python/branches/release26-maint/ (props changed)
python/branches/release26-maint/Lib/test/test_unicode.py
python/branches/release26-maint/Objects/unicodeobject.c
Modified: python/branches/release26-maint/Lib/test/test_unicode.py
==============================================================================
--- python/branches/release26-maint/Lib/test/test_unicode.py (original)
+++ python/branches/release26-maint/Lib/test/test_unicode.py Mon Jul 19 20:24:18 2010
@@ -392,6 +392,7 @@
self.assertEqual(u'%c' % 0x1234, u'\u1234')
self.assertRaises(OverflowError, u"%c".__mod__, (sys.maxunicode+1,))
+ self.assertRaises(ValueError, u"%.1\u1032f".__mod__, (1.0/3))
for num in range(0x00,0x80):
char = chr(num)
Modified: python/branches/release26-maint/Objects/unicodeobject.c
==============================================================================
--- python/branches/release26-maint/Objects/unicodeobject.c (original)
+++ python/branches/release26-maint/Objects/unicodeobject.c Mon Jul 19 20:24:18 2010
@@ -8607,7 +8607,7 @@
else if (c >= '0' && c <= '9') {
prec = c - '0';
while (--fmtcnt >= 0) {
- c = Py_CHARMASK(*fmt++);
+ c = *fmt++;
if (c < '0' || c > '9')
break;
if ((prec*10) / 10 != prec) {
More information about the Python-checkins
mailing list