Repository navigation
gh-156939: Document that PyASCIIObject ends with null byte - #157708
Merged
Merged
Conversation
Member
Author
|
This PR is similar to #157236 which documents PyBytesObject trailing null byte. |
Documentation build overview
6 files changed ·
|
Document also that PyUnicode_READ_CHAR() supports reading the trailing null byte.
vstinner
force-pushed
the
unicode_capi
branch
from
September 19, 2026 13:35
dcc4075 to
ee34138
Compare
vstinner
enabled auto-merge (squash)
September 19, 2026 13:49
|
Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.14. |
|
Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.15. |
|
GH-159530 is a backport of this pull request to the 3.14 branch. |
|
GH-159531 is a backport of this pull request to the 3.15 branch. |
vstinner
added a commit
that referenced
this pull request
Oct 16, 2026
…ter (GH-157708) (#159530) gh-156939: Document that PyUnicodeObject ends with null character (GH-157708) Document also that PyUnicode_READ() and PyUnicode_READ_CHAR() accept reading the trailing null character, and that PyUnicode_GetLength() doesn't count the trailing null character. (cherry picked from commit 4d3b405) Co-authored-by: Victor Stinner <vstinner@python.org>
vstinner
added a commit
that referenced
this pull request
Oct 16, 2026
…ter (GH-157708) (#159531) gh-156939: Document that PyUnicodeObject ends with null character (GH-157708) Document also that PyUnicode_READ() and PyUnicode_READ_CHAR() accept reading the trailing null character, and that PyUnicode_GetLength() doesn't count the trailing null character. (cherry picked from commit 4d3b405) Co-authored-by: Victor Stinner <vstinner@python.org>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Document also that PyUnicode_READ_CHAR() supports reading the trailing null byte.
Add tests on PyUnicode_READ_CHAR().