File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -604,12 +604,12 @@ pub const PyDateTime_CAPSULE_NAME: &CStr = c"datetime.datetime_CAPI";
604604/// `PyDateTime_IMPORT` is called
605605#[ inline]
606606pub unsafe fn PyDateTimeAPI ( ) -> * mut PyDateTime_CAPI {
607- PyDateTimeAPI_impl . load ( core :: sync :: atomic :: Ordering :: SeqCst )
607+ PyDateTimeAPI_impl . load ( Ordering :: Acquire )
608608}
609609
610610/// Populates the `PyDateTimeAPI` object
611611pub unsafe fn PyDateTime_IMPORT ( ) {
612- if PyDateTimeAPI_impl . load ( Ordering :: SeqCst ) . is_null ( ) {
612+ if PyDateTimeAPI_impl . load ( Ordering :: Relaxed ) . is_null ( ) {
613613 // PyPy expects the C-API to be initialized via PyDateTime_Import, so trying to use
614614 // `PyCapsule_Import` will behave unexpectedly in pypy.
615615 #[ cfg( PyPy ) ]
@@ -628,8 +628,8 @@ pub unsafe fn PyDateTime_IMPORT() {
628628 let _ = PyDateTimeAPI_impl . compare_exchange (
629629 ptr:: null_mut ( ) ,
630630 py_datetime_c_api,
631- Ordering :: SeqCst ,
632- Ordering :: SeqCst ,
631+ Ordering :: Release ,
632+ Ordering :: Relaxed ,
633633 ) ;
634634 }
635635}
You can’t perform that action at this time.
0 commit comments