change options argument type to unsigned int - #353
Open
stevengj wants to merge 2 commits into
Open
Conversation
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.
This PR changes argument-type declarations of the form
utf8proc_option_t optionstounsigned int options. The former is technically incorrect (though it worked in practice) because this argument is not in general an enumerated value, but is rather a bitwise-OR of enumerated values.(This change doesn't break the ABI, because the byte representation of
enumis the same as that ofunsigned inton all widely available systems, I think, even though strictly speaking this is not required by the C standard?)I noticed this because gcc was emitting warnings like:
Originally, these option constants were
#definepreprocessor constants, but they were changed to an enum by #29.