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

Need simpler way to get a PrimBytes field from a Ptr #21

Open
Rotaerk opened this issue Oct 27, 2019 · 0 comments
Open

Need simpler way to get a PrimBytes field from a Ptr #21

Rotaerk opened this issue Oct 27, 2019 · 0 comments

Comments

@Rotaerk
Copy link
Contributor

Rotaerk commented Oct 27, 2019

If I have a Ptr Foo, where Foo has a bar :: Word32 field, I can get that field's value like:

bPeekByteOff @Word32 fooPtr $ bFieldOffsetOf @"bar" (undefined :: Foo)

It would be nice to not have to explicitly specify the type of the field when getting it, as that should be determinable by the field name. It would also be nice to have a single function that covers this, like readField from Graphics.Vulkan.Marshal.

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