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

Improve struct access #1027

Open
badcel opened this issue Mar 13, 2024 · 0 comments
Open

Improve struct access #1027

badcel opened this issue Mar 13, 2024 · 0 comments
Milestone

Comments

@badcel
Copy link
Member

badcel commented Mar 13, 2024

Currently structs in the internal namespace use non blitable types like strings or delegates. This results in the LayoutKind attribute to be implicitly changed to "Auto".

Using blitable types should allow to use Unsafe.AsRef to access those types without creating a copy of the data.

To confirm this behavior test with the TypeInfo struct in GObject.Internal.TypeRegistrar first.

@badcel badcel added this to the 0.17.0 milestone Mar 13, 2024
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

No branches or pull requests

1 participant