]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
unicode_subtype_new() copies also the ascii flag
authorVictor Stinner <vstinner@wyplay.com>
Mon, 3 Oct 2011 12:42:15 +0000 (14:42 +0200)
committerVictor Stinner <vstinner@wyplay.com>
Mon, 3 Oct 2011 12:42:15 +0000 (14:42 +0200)
Objects/unicodeobject.c

index 30db418832050b10bf596c1b1e82c29eb10eacd4..c3e1f290e1231b8cdfe56ecdfe509b0becd9ddec 100644 (file)
@@ -12846,7 +12846,7 @@ unicode_subtype_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
     _PyUnicode_STATE(self).interned = 0;
     _PyUnicode_STATE(self).kind = kind;
     _PyUnicode_STATE(self).compact = 0;
-    _PyUnicode_STATE(self).ascii = 0;
+    _PyUnicode_STATE(self).ascii = _PyUnicode_STATE(unicode).ascii;
     _PyUnicode_STATE(self).ready = 1;
     _PyUnicode_WSTR(self) = NULL;
     _PyUnicode_UTF8_LENGTH(self) = 0;