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 is mostly just reorganizing the code handling typecodes across modules into a consistent ordering. Having a consistent ordering helps comparing implementations and spot irregularities (which may indicate a bug, and indeed, there were a few minor ones related to casting).
The ordering I adopted is based on what was used by
TypecodeOps
andarray
(although even there there were some inconsistencies), grouping by typecode klass:Within one klass, the ordering is by size, within the same size, signed then unsigned, or regular then exotic.
This change is meant to be innocent, primarily code reordering, which is already difficult to review looking at the diffs. The more challenging typecode issues, like handling of
l
/L
(are currently incorrect on non-Windows platforms),e
(is incomplete), orn
/N
(don't know what to do with that yet) are left for dedicated PRs.