[Python-checkins] r82979 - in python/branches/release31-maint: Lib/test/test_unicode.py Objects/unicodeobject.c
stefan.krah
python-checkins at python.org
Mon Jul 19 20:01:13 CEST 2010
Author: stefan.krah
Date: Mon Jul 19 20:01:13 2010
New Revision: 82979
Log:
Merged revisions 82978 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r82978 | stefan.krah | 2010-07-19 19:58:26 +0200 (Mon, 19 Jul 2010) | 3 lines
Sub-issue of #9036: Fix incorrect use of Py_CHARMASK.
........
Modified:
python/branches/release31-maint/ (props changed)
python/branches/release31-maint/Lib/test/test_unicode.py
python/branches/release31-maint/Objects/unicodeobject.c
Modified: python/branches/release31-maint/Lib/test/test_unicode.py
==============================================================================
--- python/branches/release31-maint/Lib/test/test_unicode.py (original)
+++ python/branches/release31-maint/Lib/test/test_unicode.py Mon Jul 19 20:01:13 2010
@@ -763,6 +763,7 @@
self.assertRaises(OverflowError, "%c".__mod__, (0x110000,))
self.assertEqual('%c' % '\U00021483', '\U00021483')
self.assertRaises(TypeError, "%c".__mod__, "aa")
+ self.assertRaises(ValueError, "%.1\u1032f".__mod__, (1.0/3))
# formatting jobs delegated from the string implementation:
self.assertEqual('...%(foo)s...' % {'foo':"abc"}, '...abc...')
Modified: python/branches/release31-maint/Objects/unicodeobject.c
==============================================================================
--- python/branches/release31-maint/Objects/unicodeobject.c (original)
+++ python/branches/release31-maint/Objects/unicodeobject.c Mon Jul 19 20:01:13 2010
@@ -9304,7 +9304,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