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

Stop relying on undefined behaviour #27

Merged
merged 3 commits into from
Feb 23, 2022
Merged

Stop relying on undefined behaviour #27

merged 3 commits into from
Feb 23, 2022

Conversation

bodil
Copy link
Owner

@bodil bodil commented Feb 23, 2022

smartstring now implements its own boxed string type rather than deferring directly to String, so it no longer makes assumptions it shouldn't be making about the layout of the String struct. This also allows us to organise the boxed struct in a way that will let us rely only on our basic assumption that heap memory is word aligned on both big and little endian architectures. The most immediate consequence of this is that smartstring will now compile on 32-bit big endian architectures such as mips.

Closes #4 #8 #14

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Find a more predictable way to encode the discriminant
1 participant