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

Adopt LayoutKind.Explicit for opaque structures #53

Open
chkn opened this issue Jun 26, 2022 · 0 comments
Open

Adopt LayoutKind.Explicit for opaque structures #53

chkn opened this issue Jun 26, 2022 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@chkn
Copy link
Owner

chkn commented Jun 26, 2022

Previously, CoreCLR did not support explicit layout for structs on non-Windows platforms. To work around it, we ended up adding a bunch of dummy fields, such as this one, to make opaque structs the right size.

Now that explicit layout is supported, we should remove those dummy fields and pass LayoutKind.Explicit and the Size to the StructLayout attribute.

@chkn chkn added good first issue Good for newcomers enhancement New feature or request labels Jun 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant