@@ -24,17 +24,18 @@ extern int _PyUnicode_IsCased(Py_UCS4 ch);
2424
2525/* --- Unicode API -------------------------------------------------------- */
2626
27+ // Export for '_json' shared extension
2728PyAPI_FUNC (int ) _PyUnicode_CheckConsistency (
2829 PyObject * op ,
2930 int check_content );
3031
3132extern void _PyUnicode_ExactDealloc (PyObject * op );
3233extern Py_ssize_t _PyUnicode_InternedSize (void );
3334
34- /* Get a copy of a Unicode string. */
35+ // Get a copy of a Unicode string.
36+ // Export for '_datetime' shared extension.
3537PyAPI_FUNC (PyObject * ) _PyUnicode_Copy (
36- PyObject * unicode
37- );
38+ PyObject * unicode );
3839
3940/* Unsafe version of PyUnicode_Fill(): don't check arguments and so may crash
4041 if parameters are invalid (e.g. if length is longer than the string). */
@@ -93,11 +94,13 @@ typedef struct {
9394 unsigned char readonly ;
9495} _PyUnicodeWriter ;
9596
96- /* Initialize a Unicode writer.
97- *
98- * By default, the minimum buffer size is 0 character and overallocation is
99- * disabled. Set min_length, min_char and overallocate attributes to control
100- * the allocation of the buffer. */
97+ // Initialize a Unicode writer.
98+ //
99+ // By default, the minimum buffer size is 0 character and overallocation is
100+ // disabled. Set min_length, min_char and overallocate attributes to control
101+ // the allocation of the buffer.
102+ //
103+ // Export the _PyUnicodeWriter API for '_multibytecodec' shared extension.
101104PyAPI_FUNC (void )
102105_PyUnicodeWriter_Init (_PyUnicodeWriter * writer );
103106
@@ -204,13 +207,14 @@ extern PyObject* _PyUnicode_EncodeUTF7(
204207
205208/* --- UTF-8 Codecs ------------------------------------------------------- */
206209
210+ // Export for '_tkinter' shared extension.
207211PyAPI_FUNC (PyObject * ) _PyUnicode_AsUTF8String (
208212 PyObject * unicode ,
209213 const char * errors );
210214
211215/* --- UTF-32 Codecs ------------------------------------------------------ */
212216
213- PyAPI_FUNC ( PyObject * ) _PyUnicode_EncodeUTF32 (
217+ extern PyObject * _PyUnicode_EncodeUTF32 (
214218 PyObject * object , /* Unicode object */
215219 const char * errors , /* error handling */
216220 int byteorder ); /* byteorder to use 0=BOM+native;-1=LE,1=BE */
@@ -231,7 +235,7 @@ PyAPI_FUNC(PyObject*) _PyUnicode_EncodeUTF32(
231235 Unicode BOM mark (U+FEFF). In the other two modes, no BOM mark is
232236 prepended.
233237*/
234- PyAPI_FUNC ( PyObject * ) _PyUnicode_EncodeUTF16 (
238+ extern PyObject * _PyUnicode_EncodeUTF16 (
235239 PyObject * unicode , /* Unicode object */
236240 const char * errors , /* error handling */
237241 int byteorder ); /* byteorder to use 0=BOM+native;-1=LE,1=BE */
@@ -297,13 +301,14 @@ extern PyObject* _PyUnicode_EncodeCharmap(
297301
298302/* --- Decimal Encoder ---------------------------------------------------- */
299303
300- /* Coverts a Unicode object holding a decimal value to an ASCII string
301- for using in int, float and complex parsers.
302- Transforms code points that have decimal digit property to the
303- corresponding ASCII digit code points. Transforms spaces to ASCII.
304- Transforms code points starting from the first non-ASCII code point that
305- is neither a decimal digit nor a space to the end into '?'. */
306-
304+ // Coverts a Unicode object holding a decimal value to an ASCII string
305+ // for using in int, float and complex parsers.
306+ // Transforms code points that have decimal digit property to the
307+ // corresponding ASCII digit code points. Transforms spaces to ASCII.
308+ // Transforms code points starting from the first non-ASCII code point that
309+ // is neither a decimal digit nor a space to the end into '?'.
310+ //
311+ // Export for '_testinternalcapi' shared extension.
307312PyAPI_FUNC (PyObject * ) _PyUnicode_TransformDecimalAndSpaceToASCII (
308313 PyObject * unicode ); /* Unicode object */
309314
@@ -323,9 +328,10 @@ extern int _PyUnicode_EqualToASCIIId(
323328 _Py_Identifier * right /* Right identifier */
324329 );
325330
326- /* Test whether a unicode is equal to ASCII string. Return 1 if true,
327- 0 otherwise. The right argument must be ASCII-encoded string.
328- Any error occurs inside will be cleared before return. */
331+ // Test whether a unicode is equal to ASCII string. Return 1 if true,
332+ // 0 otherwise. The right argument must be ASCII-encoded string.
333+ // Any error occurs inside will be cleared before return.
334+ // Export for '_ctypes' shared extension
329335PyAPI_FUNC (int ) _PyUnicode_EqualToASCIIString (
330336 PyObject * left ,
331337 const char * right /* ASCII-encoded string */
@@ -357,14 +363,17 @@ extern Py_ssize_t _PyUnicode_InsertThousandsGrouping(
357363
358364extern PyObject * _PyUnicode_FormatLong (PyObject * , int , int , int );
359365
360- /* Return an interned Unicode object for an Identifier; may fail if there is no memory.*/
366+ // Return an interned Unicode object for an Identifier; may fail if there is no
367+ // memory.
368+ // Export for '_testembed' program.
361369PyAPI_FUNC (PyObject * ) _PyUnicode_FromId (_Py_Identifier * );
362370
363371/* Fast equality check when the inputs are known to be exact unicode types
364372 and where the hash values are equal (i.e. a very probable match) */
365373extern int _PyUnicode_EQ (PyObject * , PyObject * );
366374
367- /* Equality check. */
375+ // Equality check.
376+ // Export for '_pickle' shared extension.
368377PyAPI_FUNC (int ) _PyUnicode_Equal (PyObject * , PyObject * );
369378
370379extern int _PyUnicode_WideCharString_Converter (PyObject * , void * );
0 commit comments