diff options
Diffstat (limited to 'Include')
-rw-r--r-- | Include/object.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Include/object.h b/Include/object.h index a687bf2..7aaa8da 100644 --- a/Include/object.h +++ b/Include/object.h @@ -1238,7 +1238,11 @@ PyType_HasFeature(PyTypeObject *type, unsigned long feature) // PyTypeObject is opaque in the limited C API flags = PyType_GetFlags(type); #else - flags = type->tp_flags; +# ifdef Py_GIL_DISABLED + flags = _Py_atomic_load_ulong_relaxed(&type->tp_flags); +# else + flags = type->tp_flags; +# endif #endif return ((flags & feature) != 0); } |