mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
[3.13] GH-119462: Enforce invariants of type versioning. Backport of GH-120731. (#120748)
* Remove uses of Py_TPFLAGS_VALID_VERSION_TAG
This commit is contained in:
parent
d0a5e40f01
commit
b8fd80f91b
7 changed files with 68 additions and 86 deletions
|
@ -2415,7 +2415,7 @@ type_assign_specific_version_unsafe(PyObject *self, PyObject *args)
|
|||
}
|
||||
assert(!PyType_HasFeature(type, Py_TPFLAGS_IMMUTABLETYPE));
|
||||
type->tp_version_tag = version;
|
||||
type->tp_flags |= Py_TPFLAGS_VALID_VERSION_TAG;
|
||||
type->tp_versions_used++;
|
||||
Py_RETURN_NONE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue