You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I recently ran into an issue where I needed to pass the address of a Struct's field to a function (see inet_ntop(3)). I ended up having to base the base address of the struct into a Pointer and calculate the field's address using the offset. This isn't hard but it does seem like a reasonable enhancement to the Struct class.
Question: would a patch/PR implementing Struct#address_of(field) be accepted? It would essentially look like this (with specs):
I recently ran into an issue where I needed to pass the address of a Struct's field to a function (see inet_ntop(3)). I ended up having to base the base address of the struct into a Pointer and calculate the field's address using the offset. This isn't hard but it does seem like a reasonable enhancement to the Struct class.
Question: would a patch/PR implementing Struct#address_of(field) be accepted? It would essentially look like this (with specs):
Feedback?
The text was updated successfully, but these errors were encountered: