Skip to content

Commit c624e7a

Browse files
encukouvstinner
andauthored
Apply batched suggestions from code review
Co-authored-by: Victor Stinner <vstinner@python.org>
1 parent 6f4f359 commit c624e7a

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

‎Include/cpython/unicodeobject.h‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,8 @@ typedef struct {
186186
(assert(PyUnicode_Check(op)), \
187187
_Py_CAST(PyASCIIObject*, (op)))
188188
#define _PyCompactUnicodeObject_CAST(op) \
189-
(assert(!_PyASCIIObject_CAST(op)->state.ascii || !_PyASCIIObject_CAST(op)->state.compact), \
189+
(assert(!(_PyASCIIObject_CAST(op)->state.ascii \
190+
&& _PyASCIIObject_CAST(op)->state.compact)), \
190191
_Py_CAST(PyCompactUnicodeObject*, (op)))
191192
#define _PyUnicodeObject_CAST(op) \
192193
(assert(!_PyASCIIObject_CAST(op)->state.compact), \

‎Include/internal/pycore_unicodeobject.h‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,8 @@ _PyUnicode_EnsureUnicode(PyObject *obj)
109109
return 0;
110110
}
111111

112-
static inline char* _PyUnicode_UTF8(PyObject *op)
112+
static inline char*
113+
_PyUnicode_UTF8(PyObject *op)
113114
{
114115
return FT_ATOMIC_LOAD_PTR_ACQUIRE(_PyCompactUnicodeObject_CAST(op)->utf8);
115116
}

0 commit comments

Comments
 (0)