https://github.com/python/cpython/commit/a2c999bd8b4d77528679d8094a4d630852618350
commit: a2c999bd8b4d77528679d8094a4d630852618350
branch: main
author: Victor Stinner <[email protected]>
committer: vstinner <[email protected]>
date: 2026-10-17T00:36:48Z
summary:

gh-157710: There is no need to export _PyUnicode_IsModifiable() (#159601)

_PyUnicodeWriter_CanWrite() doesn't call _PyUnicode_IsModifiable(),
but reimplement the function.

files:
M Include/internal/pycore_unicodeobject.h

diff --git a/Include/internal/pycore_unicodeobject.h 
b/Include/internal/pycore_unicodeobject.h
index b8e24da693be08..1a945f386ec284 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);

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to