We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9456147 commit 6adafa1Copy full SHA for 6adafa1
1 file changed
Modules/_datetimemodule.c
@@ -7331,8 +7331,8 @@ _PyDateTime_InitTypes(PyInterpreterState *interp)
7331
// `&...` is not a constant expression according to a strict reading
7332
// of C standards. Fill tp_base at run-time rather than statically.
7333
// See https://bugs.python.org/issue40777
7334
- PyDateTime_TimeZoneType.tp_base = &PyDateTime_TZInfoType;
7335
- PyDateTime_DateTimeType.tp_base = &PyDateTime_DateType;
+ _Py_atomic_store_ptr_relaxed(&PyDateTime_TimeZoneType.tp_base, &PyDateTime_TZInfoType);
+ _Py_atomic_store_ptr_relaxed(&PyDateTime_DateTimeType.tp_base , &PyDateTime_DateType);
7336
7337
/* Bases classes must be initialized before subclasses,
7338
* so capi_types must have the types in the appropriate order. */
0 commit comments