summaryrefslogtreecommitdiffstats
path: root/Modules/_testcapimodule.c
diff options
context:
space:
mode:
authorMark Shannon <mark@hotpy.org>2024-06-20 14:09:32 (GMT)
committerGitHub <noreply@github.com>2024-06-20 14:09:32 (GMT)
commitb8fd80f91b980598cb378dba224cdb595b132fb4 (patch)
tree0a6ad47a84ca82f94cefeb2a8a5f4d5edb654458 /Modules/_testcapimodule.c
parentd0a5e40f01c9e05100fb2548613805653fb71864 (diff)
downloadcpython-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.c2
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;
}