@@ -530,8 +530,8 @@ typedef struct {
530530// By default, the minimum buffer size is 0 character and overallocation is
531531// disabled. Set min_length, min_char and overallocate attributes to control
532532// 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 );
535535
536536/* Prepare the buffer to write 'length' characters
537537 with the specified maximum character.
@@ -547,9 +547,10 @@ _PyUnicodeWriter_Init(_PyUnicodeWriter *writer);
547547
548548/* Don't call this function directly, use the _PyUnicodeWriter_Prepare() macro
549549 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 );
553554
554555/* Prepare the buffer to have at least the kind KIND.
555556 For example, kind=PyUnicode_2BYTE_KIND ensures that the writer will
@@ -563,58 +564,53 @@ _PyUnicodeWriter_PrepareInternal(_PyUnicodeWriter *writer,
563564
564565/* Don't call this function directly, use the _PyUnicodeWriter_PrepareKind()
565566 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 );
569570
570571/* Append a Unicode character.
571572 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 );
576576
577577/* Append a Unicode string.
578578 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 */
583582
584583/* Append a substring of a Unicode string.
585584 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 ,
588587 PyObject * str , /* Unicode string */
589588 Py_ssize_t start ,
590- Py_ssize_t end
591- );
589+ Py_ssize_t end );
592590
593591/* Append an ASCII-encoded byte string.
594592 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 ,
597595 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 */
600597
601598/* Append a latin1-encoded byte string.
602599 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 ,
605602 const char * str , /* latin1-encoded byte string */
606- Py_ssize_t len /* length in bytes */
607- );
603+ Py_ssize_t len ); /* length in bytes */
608604
609605/* Get the value of the writer as a Unicode string. Clear the
610606 buffer of the writer. Raise an exception and return NULL
611607 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 );
614610
615611/* 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 );
618614
619615
620616/* --- Manage the default encoding ---------------------------------------- */
0 commit comments