From 743de393ab8ba485c3ed537698b26d052cc4d96b Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Sat, 17 Oct 2026 01:57:08 +0200 Subject: [PATCH] gh-157710: There is no need to export _PyUnicode_IsModifiable() _PyUnicodeWriter_CanWrite() doesn't call _PyUnicode_IsModifiable(), but reimplement the function. --- Include/internal/pycore_unicodeobject.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Include/internal/pycore_unicodeobject.h b/Include/internal/pycore_unicodeobject.h index b8e24da693be08a..1a945f386ec2849 100644 --- a/Include/internal/pycore_unicodeobject.h +++ b/Include/internal/pycore_unicodeobject.h @@ -17,9 +17,7 @@ extern "C" { #define _Py_MAX_UNICODE 0x10ffff -// Export for '_multibytecodec' shared extension. _PyUnicodeWriter_CanWrite() -// calls this function when assertions are enabled. -PyAPI_FUNC(int) _PyUnicode_IsModifiable(PyObject *unicode); +extern int _PyUnicode_IsModifiable(PyObject *unicode); extern void _PyUnicodeWriter_InitWithBuffer( _PyUnicodeWriter *writer, PyObject *buffer);