https://github.com/python/cpython/commit/c2e740ae5f7328eb55d6dab0b4fd6f7fc15cca23
commit: c2e740ae5f7328eb55d6dab0b4fd6f7fc15cca23
branch: main
author: Inada Naoki <[email protected]>
committer: methane <[email protected]>
date: 2026-09-20T00:59:06+09:00
summary:
gh-126547: pre-allocate version number for unicode type (#157781)
files:
M Objects/unicodeobject.c
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index d2faa28722b0e0..5d0b818981fc98 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -14475,6 +14475,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,
};
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]