@@ -160,43 +160,46 @@ typedef struct {
160160 unsigned int :24 ;
161161#endif
162162 } state ;
163- } _PyASCIIObject ;
163+ } PyUnstable_ASCIIObject ;
164164
165165/* Non-ASCII strings allocated through PyUnicode_New use the
166166 PyCompactUnicodeObject structure. state.compact is set, and the data
167167 immediately follow the structure. */
168168typedef struct {
169- _PyASCIIObject _base ;
169+ PyUnstable_ASCIIObject _base ;
170170 Py_ssize_t utf8_length ; /* Number of bytes in utf8, excluding the
171171 * terminating \0. */
172172 char * utf8 ; /* UTF-8 representation (null-terminated) */
173- } _PyCompactUnicodeObject ;
173+ } PyUnstable_CompactUnicodeObject ;
174174
175175/* Object format for Unicode subclasses. */
176176typedef struct {
177- _PyCompactUnicodeObject _base ;
177+ PyUnstable_CompactUnicodeObject _base ;
178178 union {
179179 void * any ;
180180 Py_UCS1 * latin1 ;
181181 Py_UCS2 * ucs2 ;
182182 Py_UCS4 * ucs4 ;
183183 } data ; /* Canonical, smallest-form Unicode buffer */
184- } _PyUnicodeObject ;
184+ } PyUnstable_UnicodeObject ;
185185
186186
187- _Py_DEPRECATED_EXTERNALLY (3.14 ) typedef _PyASCIIObject PyASCIIObject ;
188- _Py_DEPRECATED_EXTERNALLY (3.14 ) typedef _PyCompactUnicodeObject PyCompactUnicodeObject ;
189- _Py_DEPRECATED_EXTERNALLY (3.14 ) typedef _PyUnicodeObject PyUnicodeObject ;
187+ _Py_DEPRECATED_EXTERNALLY (3.14 ) typedef PyUnstable_ASCIIObject
188+ PyASCIIObject ;
189+ _Py_DEPRECATED_EXTERNALLY (3.14 ) typedef PyUnstable_CompactUnicodeObject
190+ PyCompactUnicodeObject ;
191+ _Py_DEPRECATED_EXTERNALLY (3.14 ) typedef PyUnstable_UnicodeObject
192+ PyUnicodeObject ;
190193
191194#define _PyASCIIObject_CAST (op ) \
192195 (assert(PyUnicode_Check(op)), \
193- _Py_CAST(_PyASCIIObject *, (op)))
196+ _Py_CAST(PyUnstable_ASCIIObject *, (op)))
194197#define _PyCompactUnicodeObject_CAST (op ) \
195198 (assert(PyUnicode_Check(op)), \
196- _Py_CAST(_PyCompactUnicodeObject *, (op)))
199+ _Py_CAST(PyUnstable_CompactUnicodeObject *, (op)))
197200#define _PyUnicodeObject_CAST (op ) \
198201 (assert(PyUnicode_Check(op)), \
199- _Py_CAST(_PyUnicodeObject *, (op)))
202+ _Py_CAST(PyUnstable_UnicodeObject *, (op)))
200203
201204
202205/* --- Flexible String Representation Helper Macros (PEP 393) -------------- */
0 commit comments