Skip to content

gh-155742: Get singleton in PyBytesWriter_FinishWithSize() - #155795

Merged
vstinner merged 1 commit into
python:mainfrom
vstinner:bwriter_singleton
Aug 31, 2026
Merged

gh-155742: Get singleton in PyBytesWriter_FinishWithSize()#155795
vstinner merged 1 commit into
python:mainfrom
vstinner:bwriter_singleton

Conversation

@vstinner

@vstinner vstinner commented Aug 14, 2026

Copy link
Copy Markdown
Member

If the result size of 1 byte, return the singleton rather than creating a new bytes string.

If the result size of 1 byte, return the singleton rather than
creating a new bytes string.
@vstinner
vstinner merged commit 5ef7fa1 into python:main Aug 31, 2026
56 checks passed
@vstinner
vstinner deleted the bwriter_singleton branch August 31, 2026 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant