cpython: 3b316ea5aa82 (original) (raw)

Mercurial > cpython

changeset 82058:3b316ea5aa82 3.3

Issue #17137: When an Unicode string is resized, the internal wide character string (wstr) format is now cleared. [#17137]

Victor Stinner victor.stinner@gmail.com
date Thu, 07 Feb 2013 23:12:46 +0100
parents c5fb8bc56def
children c10a3ddba483 3942c20bebdb
files Lib/test/test_unicode.py Misc/NEWS Objects/unicodeobject.c
diffstat 3 files changed, 22 insertions(+), 0 deletions(-)[+] [-] Lib/test/test_unicode.py 15 Misc/NEWS 3 Objects/unicodeobject.c 4

line wrap: on

line diff

--- a/Lib/test/test_unicode.py +++ b/Lib/test/test_unicode.py @@ -2167,6 +2167,21 @@ class UnicodeTest(string_tests.CommonTes self.assertEqual(args[0], text) self.assertEqual(len(args), 1)

+

+

+ class StringModuleTest(unittest.TestCase): def test_formatter_parser(self):

--- a/Misc/NEWS +++ b/Misc/NEWS @@ -12,6 +12,9 @@ What's New in Python 3.3.1? Core and Builtins ----------------- +- Issue #17137: When an Unicode string is resized, the internal wide character

--- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -702,6 +702,10 @@ resize_compact(PyObject *unicode, Py_ssi if (!PyUnicode_IS_ASCII(unicode)) _PyUnicode_WSTR_LENGTH(unicode) = length; }