@@ -24,17 +24,18 @@ extern int _PyUnicode_IsCased(Py_UCS4 ch);
24
24
25
25
/* --- Unicode API -------------------------------------------------------- */
26
26
27
+ // Export for '_json' shared extension
27
28
PyAPI_FUNC (int ) _PyUnicode_CheckConsistency (
28
29
PyObject * op ,
29
30
int check_content );
30
31
31
32
extern void _PyUnicode_ExactDealloc (PyObject * op );
32
33
extern Py_ssize_t _PyUnicode_InternedSize (void );
33
34
34
- /* Get a copy of a Unicode string. */
35
+ // Get a copy of a Unicode string.
36
+ // Export for '_datetime' shared extension.
35
37
PyAPI_FUNC (PyObject * ) _PyUnicode_Copy (
36
- PyObject * unicode
37
- );
38
+ PyObject * unicode );
38
39
39
40
/* Unsafe version of PyUnicode_Fill(): don't check arguments and so may crash
40
41
if parameters are invalid (e.g. if length is longer than the string). */
@@ -93,11 +94,13 @@ typedef struct {
93
94
unsigned char readonly ;
94
95
} _PyUnicodeWriter ;
95
96
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.
101
104
PyAPI_FUNC (void )
102
105
_PyUnicodeWriter_Init (_PyUnicodeWriter * writer );
103
106
@@ -204,13 +207,14 @@ extern PyObject* _PyUnicode_EncodeUTF7(
204
207
205
208
/* --- UTF-8 Codecs ------------------------------------------------------- */
206
209
210
+ // Export for '_tkinter' shared extension.
207
211
PyAPI_FUNC (PyObject * ) _PyUnicode_AsUTF8String (
208
212
PyObject * unicode ,
209
213
const char * errors );
210
214
211
215
/* --- UTF-32 Codecs ------------------------------------------------------ */
212
216
213
- PyAPI_FUNC ( PyObject * ) _PyUnicode_EncodeUTF32 (
217
+ extern PyObject * _PyUnicode_EncodeUTF32 (
214
218
PyObject * object , /* Unicode object */
215
219
const char * errors , /* error handling */
216
220
int byteorder ); /* byteorder to use 0=BOM+native;-1=LE,1=BE */
@@ -231,7 +235,7 @@ PyAPI_FUNC(PyObject*) _PyUnicode_EncodeUTF32(
231
235
Unicode BOM mark (U+FEFF). In the other two modes, no BOM mark is
232
236
prepended.
233
237
*/
234
- PyAPI_FUNC ( PyObject * ) _PyUnicode_EncodeUTF16 (
238
+ extern PyObject * _PyUnicode_EncodeUTF16 (
235
239
PyObject * unicode , /* Unicode object */
236
240
const char * errors , /* error handling */
237
241
int byteorder ); /* byteorder to use 0=BOM+native;-1=LE,1=BE */
@@ -297,13 +301,14 @@ extern PyObject* _PyUnicode_EncodeCharmap(
297
301
298
302
/* --- Decimal Encoder ---------------------------------------------------- */
299
303
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.
307
312
PyAPI_FUNC (PyObject * ) _PyUnicode_TransformDecimalAndSpaceToASCII (
308
313
PyObject * unicode ); /* Unicode object */
309
314
@@ -323,9 +328,10 @@ extern int _PyUnicode_EqualToASCIIId(
323
328
_Py_Identifier * right /* Right identifier */
324
329
);
325
330
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
329
335
PyAPI_FUNC (int ) _PyUnicode_EqualToASCIIString (
330
336
PyObject * left ,
331
337
const char * right /* ASCII-encoded string */
@@ -357,14 +363,17 @@ extern Py_ssize_t _PyUnicode_InsertThousandsGrouping(
357
363
358
364
extern PyObject * _PyUnicode_FormatLong (PyObject * , int , int , int );
359
365
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.
361
369
PyAPI_FUNC (PyObject * ) _PyUnicode_FromId (_Py_Identifier * );
362
370
363
371
/* Fast equality check when the inputs are known to be exact unicode types
364
372
and where the hash values are equal (i.e. a very probable match) */
365
373
extern int _PyUnicode_EQ (PyObject * , PyObject * );
366
374
367
- /* Equality check. */
375
+ // Equality check.
376
+ // Export for '_pickle' shared extension.
368
377
PyAPI_FUNC (int ) _PyUnicode_Equal (PyObject * , PyObject * );
369
378
370
379
extern int _PyUnicode_WideCharString_Converter (PyObject * , void * );
0 commit comments