Repository navigation
Uncomment happy path for ASCII validation and fix big-endian issues - #445
Merged
Merged
Conversation
sjakobi
approved these changes
Dec 4, 2021
Contributor
|
Looks good to me. |
Merged
Contributor
Author
|
There are two instances of this code, so fixing in both. It is not strictly necessary, because the second instance is x86/x64 only, which is never big-endian, but better to keep both in line. |
Bodigrim
added a commit
to Bodigrim/bytestring
that referenced
this pull request
Dec 7, 2021
…askell#445) * Uncomment happy path for ASCII validation and fix big-endian issues * Same in another instance of bytestring_is_valid_utf8
noughtmare
pushed a commit
to noughtmare/bytestring
that referenced
this pull request
Dec 12, 2021
…askell#445) * Uncomment happy path for ASCII validation and fix big-endian issues * Same in another instance of bytestring_is_valid_utf8
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.
As discussed in #423 (comment), this code appeared problematic on big-endian platforms and was commented out:
bytestring/cbits/is-valid-utf8.c
Lines 59 to 83 in 36874c3
This PR fixes it for big-endian platforms and uncomments this code. It is tested by CI jobs: i386, arm32 and ppc64le on behalf of little-endian systems without vectorized instructions and s390x on behalf of big-endian systems.
CC @vdukhovni @kozross