From 3a3f1432a9039f85c9369cc54643fc8731be4f23 Mon Sep 17 00:00:00 2001 From: Inada Naoki Date: Sun, 20 Sep 2026 00:59:06 +0900 Subject: [PATCH] gh-126547: pre-allocate version number for unicode type (GH-157781) (cherry picked from commit c2e740ae5f7328eb55d6dab0b4fd6f7fc15cca23) Co-authored-by: Inada Naoki --- Objects/unicodeobject.c | 1 + 1 file changed, 1 insertion(+) diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index ad24bc5d83933a..e83520454d8a79 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -14071,6 +14071,7 @@ PyTypeObject PyUnicode_Type = { 0, /* tp_alloc */ unicode_new, /* tp_new */ PyObject_Free, /* tp_free */ + .tp_version_tag = _Py_TYPE_VERSION_STR, .tp_vectorcall = unicode_vectorcall, ._tp_iteritem = unicode_iteritem, };