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 typing for ImageSectionHeader::characteristics #129

Merged
merged 1 commit into from
Jun 6, 2022

Conversation

jan-auer
Copy link
Member

@jan-auer jan-auer commented Jun 5, 2022

SectionCharacteristics is implemented as a public newtype around the raw
u32, giving access to the inner value in case flags are not implemented. The
wrapper follows the same pattern used for flags in the TPI, which parses the
flag values lazily.

There is special handling for the mutually exclusive alignment values, as well
as the _NO_PAD flag. Otherwise, all flags are exposed directly as booleans.

Fixes #106

@jan-auer jan-auer self-assigned this Jun 5, 2022
@jan-auer
Copy link
Member Author

jan-auer commented Jun 5, 2022

The constants are intentionally not exposed yet, that will be dealt with at once for #120.

cc @mstange, in case you'd like changes before this goes in

@jan-auer jan-auer added this to the 0.8.0 milestone Jun 5, 2022
@mstange
Copy link
Collaborator

mstange commented Jun 6, 2022

Looks great to me, thank you!

@jan-auer jan-auer merged commit 8eca78b into master Jun 6, 2022
@jan-auer jan-auer deleted the feat/image-section-characteristics branch June 6, 2022 07:36
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.

Add convenience accessors for ImageSectionHeader characteristics
2 participants