@@ -108,7 +108,7 @@ typedef struct {
108
108
3: Interned, Immortal, and Static
109
109
This categorization allows the runtime to determine the right
110
110
cleanup mechanism at runtime shutdown. */
111
- uint16_t interned ;
111
+ uint8_t interned ;
112
112
struct {
113
113
/* Character size:
114
114
@@ -132,21 +132,21 @@ typedef struct {
132
132
* all characters are in the range U+0000-U+10FFFF
133
133
* at least one character is in the range U+10000-U+10FFFF
134
134
*/
135
- uint16_t kind :3 ;
135
+ unsigned int kind :3 ;
136
136
/* Compact is with respect to the allocation scheme. Compact unicode
137
137
objects only require one memory block while non-compact objects use
138
138
one block for the PyUnicodeObject struct and another for its data
139
139
buffer. */
140
- uint16_t compact :1 ;
140
+ unsigned int compact :1 ;
141
141
/* The string only contains characters in the range U+0000-U+007F (ASCII)
142
142
and the kind is PyUnicode_1BYTE_KIND. If ascii is set and compact is
143
143
set, use the PyASCIIObject structure. */
144
- uint16_t ascii :1 ;
144
+ unsigned int ascii :1 ;
145
145
/* The object is statically allocated. */
146
- uint16_t statically_allocated :1 ;
146
+ unsigned int statically_allocated :1 ;
147
147
/* Padding to ensure that PyUnicode_DATA() is always aligned to
148
148
4 bytes (see issue #19537 on m68k). */
149
- uint16_t :10 ;
149
+ unsigned int :10 ;
150
150
} state ;
151
151
} PyASCIIObject ;
152
152
@@ -196,7 +196,7 @@ typedef struct {
196
196
/* Use only if you know it's a string */
197
197
static inline unsigned int PyUnicode_CHECK_INTERNED (PyObject * op ) {
198
198
#ifdef Py_GIL_DISABLED
199
- return _Py_atomic_load_uint16_relaxed (& (_PyASCIIObject_CAST (op )-> interned ));
199
+ return _Py_atomic_load_uint8_relaxed (& (_PyASCIIObject_CAST (op )-> interned ));
200
200
#else
201
201
return _PyASCIIObject_CAST (op )-> interned ;
202
202
#endif
0 commit comments