gh-117657: Make PyType_HasFeature (exported version) atomic (#120484)

Make PyType_HasFeature (exported version) atomic
This commit is contained in:
Ken Jin 2024-06-15 22:39:22 +08:00 committed by GitHub
parent 99d62f902e
commit 6f63dfff6f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 2 deletions

View file

@ -3599,7 +3599,7 @@ type_init(PyObject *cls, PyObject *args, PyObject *kwds)
unsigned long
PyType_GetFlags(PyTypeObject *type)
{
return type->tp_flags;
return FT_ATOMIC_LOAD_ULONG_RELAXED(type->tp_flags);
}