diff options
author | Mark Shannon <mark@hotpy.org> | 2024-06-20 14:09:32 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-20 14:09:32 (GMT) |
commit | b8fd80f91b980598cb378dba224cdb595b132fb4 (patch) | |
tree | 0a6ad47a84ca82f94cefeb2a8a5f4d5edb654458 /Modules/_testcapimodule.c | |
parent | d0a5e40f01c9e05100fb2548613805653fb71864 (diff) | |
download | cpython-b8fd80f91b980598cb378dba224cdb595b132fb4.zip cpython-b8fd80f91b980598cb378dba224cdb595b132fb4.tar.gz cpython-b8fd80f91b980598cb378dba224cdb595b132fb4.tar.bz2 |
[3.13] GH-119462: Enforce invariants of type versioning. Backport of GH-120731. (#120748)
* Remove uses of Py_TPFLAGS_VALID_VERSION_TAG
Diffstat (limited to 'Modules/_testcapimodule.c')
-rw-r--r-- | Modules/_testcapimodule.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/_testcapimodule.c b/Modules/_testcapimodule.c index b58c172..8b40821 100644 --- a/Modules/_testcapimodule.c +++ b/Modules/_testcapimodule.c @@ -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; } |