@@ -530,8 +530,8 @@ typedef struct {
530
530
// By default, the minimum buffer size is 0 character and overallocation is
531
531
// disabled. Set min_length, min_char and overallocate attributes to control
532
532
// the allocation of the buffer.
533
- PyAPI_FUNC (void )
534
- _PyUnicodeWriter_Init ( _PyUnicodeWriter * writer );
533
+ _Py_DEPRECATED_EXTERNALLY ( 3.14 ) PyAPI_FUNC (void ) _PyUnicodeWriter_Init (
534
+ _PyUnicodeWriter * writer );
535
535
536
536
/* Prepare the buffer to write 'length' characters
537
537
with the specified maximum character.
@@ -547,9 +547,10 @@ _PyUnicodeWriter_Init(_PyUnicodeWriter *writer);
547
547
548
548
/* Don't call this function directly, use the _PyUnicodeWriter_Prepare() macro
549
549
instead. */
550
- PyAPI_FUNC (int )
551
- _PyUnicodeWriter_PrepareInternal (_PyUnicodeWriter * writer ,
552
- Py_ssize_t length , Py_UCS4 maxchar );
550
+ _Py_DEPRECATED_EXTERNALLY (3.14 ) PyAPI_FUNC (int ) _PyUnicodeWriter_PrepareInternal (
551
+ _PyUnicodeWriter * writer ,
552
+ Py_ssize_t length ,
553
+ Py_UCS4 maxchar );
553
554
554
555
/* Prepare the buffer to have at least the kind KIND.
555
556
For example, kind=PyUnicode_2BYTE_KIND ensures that the writer will
@@ -563,58 +564,53 @@ _PyUnicodeWriter_PrepareInternal(_PyUnicodeWriter *writer,
563
564
564
565
/* Don't call this function directly, use the _PyUnicodeWriter_PrepareKind()
565
566
macro instead. */
566
- PyAPI_FUNC (int )
567
- _PyUnicodeWriter_PrepareKindInternal ( _PyUnicodeWriter * writer ,
568
- int kind );
567
+ _Py_DEPRECATED_EXTERNALLY ( 3.14 ) PyAPI_FUNC (int ) _PyUnicodeWriter_PrepareKindInternal (
568
+ _PyUnicodeWriter * writer ,
569
+ int kind );
569
570
570
571
/* Append a Unicode character.
571
572
Return 0 on success, raise an exception and return -1 on error. */
572
- PyAPI_FUNC (int )
573
- _PyUnicodeWriter_WriteChar (_PyUnicodeWriter * writer ,
574
- Py_UCS4 ch
575
- );
573
+ _Py_DEPRECATED_EXTERNALLY (3.14 ) PyAPI_FUNC (int ) _PyUnicodeWriter_WriteChar (
574
+ _PyUnicodeWriter * writer ,
575
+ Py_UCS4 ch );
576
576
577
577
/* Append a Unicode string.
578
578
Return 0 on success, raise an exception and return -1 on error. */
579
- PyAPI_FUNC (int )
580
- _PyUnicodeWriter_WriteStr (_PyUnicodeWriter * writer ,
581
- PyObject * str /* Unicode string */
582
- );
579
+ _Py_DEPRECATED_EXTERNALLY (3.14 ) PyAPI_FUNC (int ) _PyUnicodeWriter_WriteStr (
580
+ _PyUnicodeWriter * writer ,
581
+ PyObject * str ); /* Unicode string */
583
582
584
583
/* Append a substring of a Unicode string.
585
584
Return 0 on success, raise an exception and return -1 on error. */
586
- PyAPI_FUNC (int )
587
- _PyUnicodeWriter_WriteSubstring ( _PyUnicodeWriter * writer ,
585
+ _Py_DEPRECATED_EXTERNALLY ( 3.14 ) PyAPI_FUNC (int ) _PyUnicodeWriter_WriteSubstring (
586
+ _PyUnicodeWriter * writer ,
588
587
PyObject * str , /* Unicode string */
589
588
Py_ssize_t start ,
590
- Py_ssize_t end
591
- );
589
+ Py_ssize_t end );
592
590
593
591
/* Append an ASCII-encoded byte string.
594
592
Return 0 on success, raise an exception and return -1 on error. */
595
- PyAPI_FUNC (int )
596
- _PyUnicodeWriter_WriteASCIIString ( _PyUnicodeWriter * writer ,
593
+ _Py_DEPRECATED_EXTERNALLY ( 3.14 ) PyAPI_FUNC (int ) _PyUnicodeWriter_WriteASCIIString (
594
+ _PyUnicodeWriter * writer ,
597
595
const char * str , /* ASCII-encoded byte string */
598
- Py_ssize_t len /* number of bytes, or -1 if unknown */
599
- );
596
+ Py_ssize_t len ); /* number of bytes, or -1 if unknown */
600
597
601
598
/* Append a latin1-encoded byte string.
602
599
Return 0 on success, raise an exception and return -1 on error. */
603
- PyAPI_FUNC (int )
604
- _PyUnicodeWriter_WriteLatin1String ( _PyUnicodeWriter * writer ,
600
+ _Py_DEPRECATED_EXTERNALLY ( 3.14 ) PyAPI_FUNC (int ) _PyUnicodeWriter_WriteLatin1String (
601
+ _PyUnicodeWriter * writer ,
605
602
const char * str , /* latin1-encoded byte string */
606
- Py_ssize_t len /* length in bytes */
607
- );
603
+ Py_ssize_t len ); /* length in bytes */
608
604
609
605
/* Get the value of the writer as a Unicode string. Clear the
610
606
buffer of the writer. Raise an exception and return NULL
611
607
on error. */
612
- PyAPI_FUNC (PyObject * )
613
- _PyUnicodeWriter_Finish ( _PyUnicodeWriter * writer );
608
+ _Py_DEPRECATED_EXTERNALLY ( 3.14 ) PyAPI_FUNC (PyObject * ) _PyUnicodeWriter_Finish (
609
+ _PyUnicodeWriter * writer );
614
610
615
611
/* Deallocate memory of a writer (clear its internal buffer). */
616
- PyAPI_FUNC (void )
617
- _PyUnicodeWriter_Dealloc ( _PyUnicodeWriter * writer );
612
+ _Py_DEPRECATED_EXTERNALLY ( 3.14 ) PyAPI_FUNC (void ) _PyUnicodeWriter_Dealloc (
613
+ _PyUnicodeWriter * writer );
618
614
619
615
620
616
/* --- Manage the default encoding ---------------------------------------- */
0 commit comments