Skip to content

gh-157710: Avoid resize in PyUnicodeWriter_Finish() for singleton - #157862

Merged
vstinner merged 2 commits into
python:mainfrom
vstinner:writer_avoid_resize
Sep 20, 2026
Merged

vstinner merged 2 commits into
python:mainfrom
vstinner:writer_avoid_resize

Conversation

@vstinner

@vstinner vstinner commented Sep 20, 2026

Copy link
Copy Markdown
Member

PyBytesWriter_FinishWithSize() and PyUnicodeWriter_Finish() discard the output string instead of resizing it if the single byte/character singleton is used.

PyBytesWriter_FinishWithSize() and PyUnicodeWriter_Finish() discard
the output string instead of resizing it if the single byte/character
singleton is used.
@vstinner
vstinner merged commit a64b7ec into python:main Sep 20, 2026
52 checks passed
@vstinner
vstinner deleted the writer_avoid_resize branch September 20, 2026 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant