-
-
Notifications
You must be signed in to change notification settings - Fork 30.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gh-111089: Add cache to PyUnicode_AsUTF8() for embedded NUL #111587
Closed
Closed
Commits on Nov 1, 2023
-
pythongh-111089: Add cache to PyUnicode_AsUTF8() for embedded NUL
Add PyASCIIObject.state.embed_null member to Python str objects. It is used as a cache by PyUnicode_AsUTF8() to only check once if a string contains a null character. Strings created by PyUnicode_FromString() initializes *embed_null* since the string cannot contain a null character. Global static strings now also initialize the *embed_null* member. The chr(0) singleton ("\0" string) is the only static string which contains a null character.
Configuration menu - View commit details
-
Copy full SHA for 8004312 - Browse repository at this point
Copy the full SHA 8004312View commit details -
fixup! pythongh-111089: Add cache to PyUnicode_AsUTF8() for embedded NUL
Fix unicode_subtype_new
Configuration menu - View commit details
-
Copy full SHA for a7e93c9 - Browse repository at this point
Copy the full SHA a7e93c9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4ccd7d9 - Browse repository at this point
Copy the full SHA 4ccd7d9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3c4844f - Browse repository at this point
Copy the full SHA 3c4844fView commit details -
Configuration menu - View commit details
-
Copy full SHA for e224751 - Browse repository at this point
Copy the full SHA e224751View commit details -
Configuration menu - View commit details
-
Copy full SHA for 65c6671 - Browse repository at this point
Copy the full SHA 65c6671View commit details -
Configuration menu - View commit details
-
Copy full SHA for 30bb725 - Browse repository at this point
Copy the full SHA 30bb725View commit details -
Configuration menu - View commit details
-
Copy full SHA for 07975be - Browse repository at this point
Copy the full SHA 07975beView commit details
Commits on Nov 2, 2023
-
Set embed_null in more cases on new strings
* unicode_char() * PyUnicode_FromWideChar(str, -1) * _PyUnicode_Copy()
Configuration menu - View commit details
-
Copy full SHA for e3c6fa5 - Browse repository at this point
Copy the full SHA e3c6fa5View commit details
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.