Skip to content

Commit ea99865

Browse files
committed
fixup! gh-111089: Add cache to PyUnicode_AsUTF8() for embedded NUL
Fix unicode_subtype_new
1 parent 84a2b8d commit ea99865

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Objects/unicodeobject.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14668,6 +14668,7 @@ unicode_subtype_new(PyTypeObject *type, PyObject *unicode)
1466814668
_PyUnicode_STATE(self).compact = 0;
1466914669
_PyUnicode_STATE(self).ascii = _PyUnicode_STATE(unicode).ascii;
1467014670
_PyUnicode_STATE(self).statically_allocated = 0;
14671+
_PyUnicode_STATE(self).embed_null = 2;
1467114672
_PyUnicode_UTF8_LENGTH(self) = 0;
1467214673
_PyUnicode_UTF8(self) = NULL;
1467314674
_PyUnicode_DATA_ANY(self) = NULL;

0 commit comments

Comments
 (0)