summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorKumar Aditya <59607654+kumaraditya303@users.noreply.github.com>2023-02-08 18:02:15 (GMT)
committerGitHub <noreply@github.com>2023-02-08 18:02:15 (GMT)
commitd9de0792482d2ded364b0c7d2867b97a5da41b12 (patch)
treef16450ad9e6a666dbed7fb2cb605bfc106e5d088 /Objects
parent2a8bf2580441147f1a15e61229d669abc0ab86ee (diff)
downloadcpython-d9de0792482d2ded364b0c7d2867b97a5da41b12.zip
cpython-d9de0792482d2ded364b0c7d2867b97a5da41b12.tar.gz
cpython-d9de0792482d2ded364b0c7d2867b97a5da41b12.tar.bz2
GH-101696: invalidate type version tag in `_PyStaticType_Dealloc` (#101697)
Diffstat (limited to 'Objects')
-rw-r--r--Objects/typeobject.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
index 59e0bf2..bf6ccdb 100644
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -4469,6 +4469,8 @@ _PyStaticType_Dealloc(PyTypeObject *type)
}
type->tp_flags &= ~Py_TPFLAGS_READY;
+ type->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG;
+ type->tp_version_tag = 0;
if (type->tp_flags & _Py_TPFLAGS_STATIC_BUILTIN) {
_PyStaticType_ClearWeakRefs(type);