From 377855cf1dadbf37310ec9cd31e1a25acd13f52d Mon Sep 17 00:00:00 2001 From: sobolevn Date: Mon, 13 Jan 2025 11:16:15 +0300 Subject: [PATCH] Port to 3.13 --- Objects/typeobject.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Objects/typeobject.c b/Objects/typeobject.c index bde118e2cc8abe5..faaf6e605efa901 100644 --- a/Objects/typeobject.c +++ b/Objects/typeobject.c @@ -996,9 +996,15 @@ type_modified_unlocked(PyTypeObject *type) We don't assign new version tags eagerly, but only as needed. */ +#ifdef Py_GIL_DISABLED if (_Py_atomic_load_uint_relaxed(type->tp_version_tag) == 0) { return; } +#else + if (type->tp_version_tag == 0) { + return; + } +#endif // Cannot modify static builtin types. assert((type->tp_flags & _Py_TPFLAGS_STATIC_BUILTIN) == 0);