Xamarin.SwiftUI icon indicating copy to clipboard operation
Xamarin.SwiftUI copied to clipboard

Adopt `LayoutKind.Explicit` for opaque structures

Open chkn opened this issue 3 years ago • 0 comments

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 avatar Jun 26 '22 03:06 chkn