Skip to content
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

Add #bit_reverse and #byte_swap for primitive integers #12865

Merged

Conversation

HertzDevil
Copy link
Contributor

@HertzDevil HertzDevil commented Dec 21, 2022

Resolves #12828.

The standard library uses these new methods immediately; this shouldn't break the interpreter in 1.6 because no new primitives are used. IO::ByteFormat might also leverage #byte_swap, but that must wait until after 1.7 is released so as not to break interpreted code.

@straight-shoota straight-shoota added this to the 1.7.0 milestone Dec 21, 2022
Copy link
Member

@sdogruyol sdogruyol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @HertzDevil 🙏

@straight-shoota straight-shoota merged commit ba5f522 into crystal-lang:master Dec 23, 2022
@HertzDevil HertzDevil deleted the feature/bswap-bitreverse branch December 23, 2022 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Expose bswap and bitreverse to primitive integers
3 participants