Skip to content

Commit 9481cd6

Browse files
committed
Fix compiler warnings
Also mark _PyUnicodeWriter_Prepare() as deprecated
1 parent 0b1df72 commit 9481cd6

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎Include/cpython/unicodeobject.h‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,7 @@ _Py_DEPRECATED_EXTERNALLY(3.14) PyAPI_FUNC(int) _PyUnicodeWriter_PrepareInternal
567567
// with the specified maximum character.
568568
//
569569
// Return 0 on success. Set an exception and return -1 on error.
570-
static inline int
570+
_Py_DEPRECATED_EXTERNALLY(3.14) static inline int
571571
_PyUnicodeWriter_Prepare(_PyUnicodeWriter *writer,
572572
Py_ssize_t length, Py_UCS4 maxchar)
573573
{
@@ -578,7 +578,10 @@ _PyUnicodeWriter_Prepare(_PyUnicodeWriter *writer,
578578
if (length == 0) {
579579
return 0;
580580
}
581+
_Py_COMP_DIAG_PUSH
582+
_Py_COMP_DIAG_IGNORE_DEPR_DECLS
581583
return _PyUnicodeWriter_PrepareInternal(writer, length, maxchar);
584+
_Py_COMP_DIAG_POP
582585
}
583586

584587
/* Prepare the buffer to have at least the kind KIND.

0 commit comments

Comments
 (0)