@@ -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,33 +207,36 @@ 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
217
+ // Export for '_tkinter' shared extension
213
218
PyAPI_FUNC (PyObject * ) _PyUnicode_EncodeUTF32 (
214
219
PyObject * object , /* Unicode object */
215
220
const char * errors , /* error handling */
216
221
int byteorder ); /* byteorder to use 0=BOM+native;-1=LE,1=BE */
217
222
218
223
/* --- UTF-16 Codecs ------------------------------------------------------ */
219
224
220
- /* Returns a Python string object holding the UTF-16 encoded value of
221
- the Unicode data.
222
-
223
- If byteorder is not 0, output is written according to the following
224
- byte order:
225
-
226
- byteorder == -1: little endian
227
- byteorder == 0: native byte order (writes a BOM mark)
228
- byteorder == 1: big endian
229
-
230
- If byteorder is 0, the output string will always start with the
231
- Unicode BOM mark (U+FEFF). In the other two modes, no BOM mark is
232
- prepended.
233
- */
225
+ // Returns a Python string object holding the UTF-16 encoded value of
226
+ // the Unicode data.
227
+ //
228
+ // If byteorder is not 0, output is written according to the following
229
+ // byte order:
230
+ //
231
+ // byteorder == -1: little endian
232
+ // byteorder == 0: native byte order (writes a BOM mark)
233
+ // byteorder == 1: big endian
234
+ //
235
+ // If byteorder is 0, the output string will always start with the
236
+ // Unicode BOM mark (U+FEFF). In the other two modes, no BOM mark is
237
+ // prepended.
238
+ //
239
+ // Export for '_tkinter' shared extension
234
240
PyAPI_FUNC (PyObject * ) _PyUnicode_EncodeUTF16 (
235
241
PyObject * unicode , /* Unicode object */
236
242
const char * errors , /* error handling */
@@ -297,13 +303,14 @@ extern PyObject* _PyUnicode_EncodeCharmap(
297
303
298
304
/* --- Decimal Encoder ---------------------------------------------------- */
299
305
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
-
306
+ // Coverts a Unicode object holding a decimal value to an ASCII string
307
+ // for using in int, float and complex parsers.
308
+ // Transforms code points that have decimal digit property to the
309
+ // corresponding ASCII digit code points. Transforms spaces to ASCII.
310
+ // Transforms code points starting from the first non-ASCII code point that
311
+ // is neither a decimal digit nor a space to the end into '?'.
312
+ //
313
+ // Export for '_testinternalcapi' shared extension.
307
314
PyAPI_FUNC (PyObject * ) _PyUnicode_TransformDecimalAndSpaceToASCII (
308
315
PyObject * unicode ); /* Unicode object */
309
316
@@ -323,9 +330,10 @@ extern int _PyUnicode_EqualToASCIIId(
323
330
_Py_Identifier * right /* Right identifier */
324
331
);
325
332
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. */
333
+ // Test whether a unicode is equal to ASCII string. Return 1 if true,
334
+ // 0 otherwise. The right argument must be ASCII-encoded string.
335
+ // Any error occurs inside will be cleared before return.
336
+ // Export for '_ctypes' shared extension
329
337
PyAPI_FUNC (int ) _PyUnicode_EqualToASCIIString (
330
338
PyObject * left ,
331
339
const char * right /* ASCII-encoded string */
@@ -357,14 +365,17 @@ extern Py_ssize_t _PyUnicode_InsertThousandsGrouping(
357
365
358
366
extern PyObject * _PyUnicode_FormatLong (PyObject * , int , int , int );
359
367
360
- /* Return an interned Unicode object for an Identifier; may fail if there is no memory.*/
368
+ // Return an interned Unicode object for an Identifier; may fail if there is no
369
+ // memory.
370
+ // Export for '_testembed' program.
361
371
PyAPI_FUNC (PyObject * ) _PyUnicode_FromId (_Py_Identifier * );
362
372
363
373
/* Fast equality check when the inputs are known to be exact unicode types
364
374
and where the hash values are equal (i.e. a very probable match) */
365
375
extern int _PyUnicode_EQ (PyObject * , PyObject * );
366
376
367
- /* Equality check. */
377
+ // Equality check.
378
+ // Export for '_pickle' shared extension.
368
379
PyAPI_FUNC (int ) _PyUnicode_Equal (PyObject * , PyObject * );
369
380
370
381
extern int _PyUnicode_WideCharString_Converter (PyObject * , void * );
0 commit comments