@@ -201,9 +201,9 @@ PyAPI_FUNC(int) _PyUnicode_CheckConsistency(
201201#define SSTATE_INTERNED_IMMORTAL_STATIC 3
202202
203203/* Use only if you know it's a string */
204- PyAPI_FUNC (unsigned int ) GraalPyPrivate_Unicode_CHECK_INTERNED (PyObject * op );
204+ PyAPI_FUNC (unsigned int ) GraalPyUnicode_CHECK_INTERNED (PyObject * op );
205205static inline unsigned int PyUnicode_CHECK_INTERNED (PyObject * op ) {
206- return GraalPyPrivate_Unicode_CHECK_INTERNED (op );
206+ return GraalPyUnicode_CHECK_INTERNED (op );
207207}
208208#define PyUnicode_CHECK_INTERNED (op ) PyUnicode_CHECK_INTERNED(_PyObject_CAST(op))
209209
@@ -216,17 +216,17 @@ static inline unsigned int PyUnicode_IS_READY(PyObject* Py_UNUSED(op)) {
216216/* Return true if the string contains only ASCII characters, or 0 if not. The
217217 string may be compact (PyUnicode_IS_COMPACT_ASCII) or not, but must be
218218 ready. */
219- PyAPI_FUNC (unsigned int ) GraalPyPrivate_Unicode_IS_ASCII (PyObject * op );
219+ PyAPI_FUNC (unsigned int ) GraalPyUnicode_IS_ASCII (PyObject * op );
220220static inline unsigned int PyUnicode_IS_ASCII (PyObject * op ) {
221- return GraalPyPrivate_Unicode_IS_ASCII (op );
221+ return GraalPyUnicode_IS_ASCII (op );
222222}
223223#define PyUnicode_IS_ASCII (op ) PyUnicode_IS_ASCII(_PyObject_CAST(op))
224224
225225/* Return true if the string is compact or 0 if not.
226226 No type checks or Ready calls are performed. */
227- PyAPI_FUNC (unsigned int ) GraalPyPrivate_Unicode_IS_COMPACT (PyObject * op );
227+ PyAPI_FUNC (unsigned int ) GraalPyUnicode_IS_COMPACT (PyObject * op );
228228static inline unsigned int PyUnicode_IS_COMPACT (PyObject * op ) {
229- return GraalPyPrivate_Unicode_IS_COMPACT (op );
229+ return GraalPyUnicode_IS_COMPACT (op );
230230}
231231#define PyUnicode_IS_COMPACT (op ) PyUnicode_IS_COMPACT(_PyObject_CAST(op))
232232
@@ -244,24 +244,24 @@ enum PyUnicode_Kind {
244244 PyUnicode_4BYTE_KIND = 4
245245};
246246
247- PyAPI_FUNC (int ) GraalPyPrivate_Unicode_KIND (PyObject * );
247+ PyAPI_FUNC (int ) GraalPyUnicode_KIND (PyObject * );
248248// PyUnicode_KIND(): Return one of the PyUnicode_*_KIND values defined above.
249249//
250250// gh-89653: Converting this macro to a static inline function would introduce
251251// new compiler warnings on "kind < PyUnicode_KIND(str)" (compare signed and
252252// unsigned numbers) where kind type is an int or on
253253// "unsigned int kind = PyUnicode_KIND(str)" (cast signed to unsigned).
254- #define PyUnicode_KIND (op ) ((enum PyUnicode_Kind)GraalPyPrivate_Unicode_KIND (_PyObject_CAST(op)))
254+ #define PyUnicode_KIND (op ) ((enum PyUnicode_Kind)GraalPyUnicode_KIND (_PyObject_CAST(op)))
255255
256256/* Return a void pointer to the raw unicode buffer. */
257257static inline void * _PyUnicode_COMPACT_DATA (PyObject * Py_UNUSED (op )) {
258258 // strings are never compact in GraalPy
259259 return NULL ;
260260}
261261
262- PyAPI_FUNC (void * ) GraalPyPrivate_Unicode_NONCOMPACT_DATA (PyObject * op );
262+ PyAPI_FUNC (void * ) GraalPyUnicode_NONCOMPACT_DATA (PyObject * op );
263263static inline void * _PyUnicode_NONCOMPACT_DATA (PyObject * op ) {
264- return GraalPyPrivate_Unicode_NONCOMPACT_DATA (op );
264+ return GraalPyUnicode_NONCOMPACT_DATA (op );
265265}
266266
267267static inline void * PyUnicode_DATA (PyObject * op ) {
@@ -282,9 +282,9 @@ static inline void* PyUnicode_DATA(PyObject *op) {
282282#define PyUnicode_4BYTE_DATA (op ) _Py_STATIC_CAST(Py_UCS4*, PyUnicode_DATA(op))
283283
284284/* Returns the length of the unicode string. */
285- PyAPI_FUNC (Py_ssize_t ) GraalPyPrivate_Unicode_GET_LENGTH (PyObject * op );
285+ PyAPI_FUNC (Py_ssize_t ) GraalPyUnicode_GET_LENGTH (PyObject * op );
286286static inline Py_ssize_t PyUnicode_GET_LENGTH (PyObject * op ) {
287- return GraalPyPrivate_Unicode_GET_LENGTH (op );
287+ return GraalPyUnicode_GET_LENGTH (op );
288288}
289289#define PyUnicode_GET_LENGTH (op ) PyUnicode_GET_LENGTH(_PyObject_CAST(op))
290290
0 commit comments