Skip to content

Commit b4b5570

Browse files
committed
Port to 3.13
1 parent 1919228 commit b4b5570

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Objects/typeobject.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -996,9 +996,15 @@ type_modified_unlocked(PyTypeObject *type)
996996
We don't assign new version tags eagerly, but only as
997997
needed.
998998
*/
999-
if (_Py_atomic_load_uint_relaxed(type->tp_version_tag) == 0) {
999+
#ifdef Py_GIL_DISABLED
1000+
if (_Py_atomic_load_uint_relaxed(&type->tp_version_tag) == 0) {
1001+
return;
1002+
}
1003+
#else
1004+
if (type->tp_version_tag == 0) {
10001005
return;
10011006
}
1007+
#endif
10021008
// Cannot modify static builtin types.
10031009
assert((type->tp_flags & _Py_TPFLAGS_STATIC_BUILTIN) == 0);
10041010

0 commit comments

Comments
 (0)