@@ -11,8 +11,12 @@ extern "C" {
1111#include "pycore_fileutils.h" // _Py_error_handler
1212#include "pycore_ucnhash.h" // _PyUnicode_Name_CAPI
1313
14- void _PyUnicode_ExactDealloc (PyObject * op );
15- Py_ssize_t _PyUnicode_InternedSize (void );
14+ PyAPI_FUNC (int ) _PyUnicode_CheckConsistency (
15+ PyObject * op ,
16+ int check_content );
17+
18+ extern void _PyUnicode_ExactDealloc (PyObject * op );
19+ extern Py_ssize_t _PyUnicode_InternedSize (void );
1620
1721/* Get a copy of a Unicode string. */
1822PyAPI_FUNC (PyObject * ) _PyUnicode_Copy (
@@ -277,6 +281,18 @@ extern PyObject* _PyUnicode_EncodeCharmap(
277281 PyObject * mapping , /* encoding mapping */
278282 const char * errors ); /* error handling */
279283
284+ /* --- Decimal Encoder ---------------------------------------------------- */
285+
286+ /* Coverts a Unicode object holding a decimal value to an ASCII string
287+ for using in int, float and complex parsers.
288+ Transforms code points that have decimal digit property to the
289+ corresponding ASCII digit code points. Transforms spaces to ASCII.
290+ Transforms code points starting from the first non-ASCII code point that
291+ is neither a decimal digit nor a space to the end into '?'. */
292+
293+ PyAPI_FUNC (PyObject * ) _PyUnicode_TransformDecimalAndSpaceToASCII (
294+ PyObject * unicode ); /* Unicode object */
295+
280296/* --- Methods & Slots ---------------------------------------------------- */
281297
282298extern PyObject * _PyUnicode_JoinArray (
@@ -323,6 +339,25 @@ extern Py_ssize_t _PyUnicode_InsertThousandsGrouping(
323339 PyObject * thousands_sep ,
324340 Py_UCS4 * maxchar );
325341
342+ /* --- Misc functions ----------------------------------------------------- */
343+
344+ extern PyObject * _PyUnicode_FormatLong (PyObject * , int , int , int );
345+
346+ /* Return an interned Unicode object for an Identifier; may fail if there is no memory.*/
347+ PyAPI_FUNC (PyObject * ) _PyUnicode_FromId (_Py_Identifier * );
348+
349+ /* Fast equality check when the inputs are known to be exact unicode types
350+ and where the hash values are equal (i.e. a very probable match) */
351+ extern int _PyUnicode_EQ (PyObject * , PyObject * );
352+
353+ /* Equality check. */
354+ PyAPI_FUNC (int ) _PyUnicode_Equal (PyObject * , PyObject * );
355+
356+ extern int _PyUnicode_WideCharString_Converter (PyObject * , void * );
357+ extern int _PyUnicode_WideCharString_Opt_Converter (PyObject * , void * );
358+
359+ PyAPI_FUNC (Py_ssize_t ) _PyUnicode_ScanIdentifier (PyObject * );
360+
326361/* --- Runtime lifecycle -------------------------------------------------- */
327362
328363extern void _PyUnicode_InitState (PyInterpreterState * );
0 commit comments