Skip to content

Commit

Permalink
Port to 3.13
Browse files Browse the repository at this point in the history
  • Loading branch information
sobolevn committed Jan 13, 2025
1 parent 1919228 commit b4b5570
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Objects/typeobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -996,9 +996,15 @@ type_modified_unlocked(PyTypeObject *type)
We don't assign new version tags eagerly, but only as
needed.
*/
if (_Py_atomic_load_uint_relaxed(type->tp_version_tag) == 0) {
#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);

Expand Down

0 comments on commit b4b5570

Please sign in to comment.