@@ -125,7 +125,7 @@ NOTE: In the interpreter's initialization phase, some globals are currently
125
125
(assert(_PyUnicode_CHECK(op)), \
126
126
PyUnicode_IS_COMPACT_ASCII(op) ? \
127
127
_PyASCIIObject_CAST(op)->length : \
128
- FT_ATOMIC_LOAD_SSIZE (_PyUnicode_UTF8_LENGTH(op)))
128
+ FT_ATOMIC_LOAD_SSIZE_RELAXED (_PyUnicode_UTF8_LENGTH(op)))
129
129
130
130
#define _PyUnicode_LENGTH (op ) \
131
131
(_PyASCIIObject_CAST(op)->length)
@@ -668,15 +668,15 @@ _PyUnicode_CheckConsistency(PyObject *op, int check_content)
668
668
CHECK (data != NULL );
669
669
if (ascii -> state .ascii ) {
670
670
CHECK (FT_ATOMIC_LOAD_PTR (compact -> utf8 ) == data );
671
- CHECK (FT_ATOMIC_LOAD_SSIZE (compact -> utf8_length ) == ascii -> length );
671
+ CHECK (FT_ATOMIC_LOAD_SSIZE_RELAXED (compact -> utf8_length ) == ascii -> length );
672
672
}
673
673
else {
674
674
CHECK (FT_ATOMIC_LOAD_PTR (compact -> utf8 ) != data );
675
675
}
676
676
}
677
677
678
678
if (FT_ATOMIC_LOAD_PTR (compact -> utf8 ) == NULL )
679
- CHECK (FT_ATOMIC_LOAD_SSIZE (compact -> utf8_length ) == ascii -> length );
679
+ CHECK (FT_ATOMIC_LOAD_SSIZE_RELAXED (compact -> utf8_length ) == 0 );
680
680
}
681
681
682
682
/* check that the best kind is used: O(n) operation */
@@ -5825,7 +5825,7 @@ unicode_fill_utf8(PyObject *unicode)
5825
5825
assert (!PyUnicode_IS_ASCII (unicode ));
5826
5826
int ret = 0 ;
5827
5827
Py_BEGIN_CRITICAL_SECTION (unicode );
5828
- if (FT_ATOMIC_LOAD_PTR_RELAXED (_PyUnicode_UTF8 (unicode ))) {
5828
+ if (FT_ATOMIC_LOAD_PTR (_PyUnicode_UTF8 (unicode ))) {
5829
5829
goto exit ;
5830
5830
}
5831
5831
int kind = PyUnicode_KIND (unicode );
0 commit comments