@@ -167,10 +167,6 @@ typedef struct {
167
167
} data ; /* Canonical, smallest-form Unicode buffer */
168
168
} PyUnicodeObject ;
169
169
170
- PyAPI_FUNC (int ) _PyUnicode_CheckConsistency (
171
- PyObject * op ,
172
- int check_content );
173
-
174
170
175
171
#define _PyASCIIObject_CAST (op ) \
176
172
(assert(PyUnicode_Check(op)), \
@@ -461,125 +457,6 @@ PyAPI_FUNC(const char *) PyUnicode_AsUTF8(PyObject *unicode);
461
457
462
458
#define _PyUnicode_AsString PyUnicode_AsUTF8
463
459
464
- /* --- UTF-7 Codecs ------------------------------------------------------- */
465
-
466
- PyAPI_FUNC (PyObject * ) _PyUnicode_EncodeUTF7 (
467
- PyObject * unicode , /* Unicode object */
468
- int base64SetO , /* Encode RFC2152 Set O characters in base64 */
469
- int base64WhiteSpace , /* Encode whitespace (sp, ht, nl, cr) in base64 */
470
- const char * errors /* error handling */
471
- );
472
-
473
- /* --- UTF-8 Codecs ------------------------------------------------------- */
474
-
475
- PyAPI_FUNC (PyObject * ) _PyUnicode_AsUTF8String (
476
- PyObject * unicode ,
477
- const char * errors );
478
-
479
- /* --- UTF-32 Codecs ------------------------------------------------------ */
480
-
481
- PyAPI_FUNC (PyObject * ) _PyUnicode_EncodeUTF32 (
482
- PyObject * object , /* Unicode object */
483
- const char * errors , /* error handling */
484
- int byteorder /* byteorder to use 0=BOM+native;-1=LE,1=BE */
485
- );
486
-
487
- /* --- UTF-16 Codecs ------------------------------------------------------ */
488
-
489
- /* Returns a Python string object holding the UTF-16 encoded value of
490
- the Unicode data.
491
-
492
- If byteorder is not 0, output is written according to the following
493
- byte order:
494
-
495
- byteorder == -1: little endian
496
- byteorder == 0: native byte order (writes a BOM mark)
497
- byteorder == 1: big endian
498
-
499
- If byteorder is 0, the output string will always start with the
500
- Unicode BOM mark (U+FEFF). In the other two modes, no BOM mark is
501
- prepended.
502
- */
503
- PyAPI_FUNC (PyObject * ) _PyUnicode_EncodeUTF16 (
504
- PyObject * unicode , /* Unicode object */
505
- const char * errors , /* error handling */
506
- int byteorder /* byteorder to use 0=BOM+native;-1=LE,1=BE */
507
- );
508
-
509
- /* --- Unicode-Escape Codecs ---------------------------------------------- */
510
-
511
- /* Variant of PyUnicode_DecodeUnicodeEscape that supports partial decoding. */
512
- PyAPI_FUNC (PyObject * ) _PyUnicode_DecodeUnicodeEscapeStateful (
513
- const char * string , /* Unicode-Escape encoded string */
514
- Py_ssize_t length , /* size of string */
515
- const char * errors , /* error handling */
516
- Py_ssize_t * consumed /* bytes consumed */
517
- );
518
- /* Helper for PyUnicode_DecodeUnicodeEscape that detects invalid escape
519
- chars. */
520
- PyAPI_FUNC (PyObject * ) _PyUnicode_DecodeUnicodeEscapeInternal (
521
- const char * string , /* Unicode-Escape encoded string */
522
- Py_ssize_t length , /* size of string */
523
- const char * errors , /* error handling */
524
- Py_ssize_t * consumed , /* bytes consumed */
525
- const char * * first_invalid_escape /* on return, points to first
526
- invalid escaped char in
527
- string. */
528
- );
529
-
530
- /* --- Raw-Unicode-Escape Codecs ---------------------------------------------- */
531
-
532
- /* Variant of PyUnicode_DecodeRawUnicodeEscape that supports partial decoding. */
533
- PyAPI_FUNC (PyObject * ) _PyUnicode_DecodeRawUnicodeEscapeStateful (
534
- const char * string , /* Unicode-Escape encoded string */
535
- Py_ssize_t length , /* size of string */
536
- const char * errors , /* error handling */
537
- Py_ssize_t * consumed /* bytes consumed */
538
- );
539
-
540
- /* --- Latin-1 Codecs ----------------------------------------------------- */
541
-
542
- PyAPI_FUNC (PyObject * ) _PyUnicode_AsLatin1String (
543
- PyObject * unicode ,
544
- const char * errors );
545
-
546
- /* --- ASCII Codecs ------------------------------------------------------- */
547
-
548
- PyAPI_FUNC (PyObject * ) _PyUnicode_AsASCIIString (
549
- PyObject * unicode ,
550
- const char * errors );
551
-
552
- /* --- Character Map Codecs ----------------------------------------------- */
553
-
554
- /* Translate an Unicode object by applying a character mapping table to
555
- it and return the resulting Unicode object.
556
-
557
- The mapping table must map Unicode ordinal integers to Unicode strings,
558
- Unicode ordinal integers or None (causing deletion of the character).
559
-
560
- Mapping tables may be dictionaries or sequences. Unmapped character
561
- ordinals (ones which cause a LookupError) are left untouched and
562
- are copied as-is.
563
- */
564
- PyAPI_FUNC (PyObject * ) _PyUnicode_EncodeCharmap (
565
- PyObject * unicode , /* Unicode object */
566
- PyObject * mapping , /* encoding mapping */
567
- const char * errors /* error handling */
568
- );
569
-
570
- /* --- Decimal Encoder ---------------------------------------------------- */
571
-
572
- /* Coverts a Unicode object holding a decimal value to an ASCII string
573
- for using in int, float and complex parsers.
574
- Transforms code points that have decimal digit property to the
575
- corresponding ASCII digit code points. Transforms spaces to ASCII.
576
- Transforms code points starting from the first non-ASCII code point that
577
- is neither a decimal digit nor a space to the end into '?'. */
578
-
579
- PyAPI_FUNC (PyObject * ) _PyUnicode_TransformDecimalAndSpaceToASCII (
580
- PyObject * unicode /* Unicode object */
581
- );
582
-
583
460
/* === Characters Type APIs =============================================== */
584
461
585
462
/* These should not be used directly. Use the Py_UNICODE_IS* and
@@ -729,23 +606,3 @@ static inline int Py_UNICODE_ISALNUM(Py_UCS4 ch) {
729
606
|| Py_UNICODE_ISDIGIT (ch )
730
607
|| Py_UNICODE_ISNUMERIC (ch ));
731
608
}
732
-
733
-
734
- /* === Misc functions ===================================================== */
735
-
736
- PyAPI_FUNC (PyObject * ) _PyUnicode_FormatLong (PyObject * , int , int , int );
737
-
738
- /* Return an interned Unicode object for an Identifier; may fail if there is no memory.*/
739
- PyAPI_FUNC (PyObject * ) _PyUnicode_FromId (_Py_Identifier * );
740
-
741
- /* Fast equality check when the inputs are known to be exact unicode types
742
- and where the hash values are equal (i.e. a very probable match) */
743
- PyAPI_FUNC (int ) _PyUnicode_EQ (PyObject * , PyObject * );
744
-
745
- /* Equality check. */
746
- PyAPI_FUNC (int ) _PyUnicode_Equal (PyObject * , PyObject * );
747
-
748
- PyAPI_FUNC (int ) _PyUnicode_WideCharString_Converter (PyObject * , void * );
749
- PyAPI_FUNC (int ) _PyUnicode_WideCharString_Opt_Converter (PyObject * , void * );
750
-
751
- PyAPI_FUNC (Py_ssize_t ) _PyUnicode_ScanIdentifier (PyObject * );
0 commit comments