Skip to content

Commit

Permalink
fixup! pythongh-111089: Add cache to PyUnicode_AsUTF8() for embedded NUL
Browse files Browse the repository at this point in the history
Fix unicode_subtype_new
  • Loading branch information
vstinner committed Nov 1, 2023
1 parent 84a2b8d commit ea99865
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Objects/unicodeobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -14668,6 +14668,7 @@ unicode_subtype_new(PyTypeObject *type, PyObject *unicode)
_PyUnicode_STATE(self).compact = 0;
_PyUnicode_STATE(self).ascii = _PyUnicode_STATE(unicode).ascii;
_PyUnicode_STATE(self).statically_allocated = 0;
_PyUnicode_STATE(self).embed_null = 2;
_PyUnicode_UTF8_LENGTH(self) = 0;
_PyUnicode_UTF8(self) = NULL;
_PyUnicode_DATA_ANY(self) = NULL;
Expand Down

0 comments on commit ea99865

Please sign in to comment.