[foreign] RFR 8219103: Add an offsetOf utility to find the offset of Struct fields

Sundararajan Athijegannathan sundararajan.athijegannathan at oracle.com
Fri Feb 15 15:38:21 UTC 2019


Struct has "sizeof" but "offsetOf" ? Either sizeOf / offsetOf or 
sizeof/offsetof (latter if we want to mimic C operator/macro).

-Sundar

On 15/02/19, 8:57 PM, Jorn Vernee wrote:
> Hi,
>
> This is an RFR for the earlier proposed offsetOf utility for finding 
> the offset of a field of a struct.
>
> This is based on Maurizio's suggestion to use the LayoutPath API [1], 
> with some minor tweaks and a test added.
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8219103
> Webrev: 
> http://cr.openjdk.java.net/~jvernee/panama/webrevs/8219103/webrev.00/
>
> Thanks,
> Jorn
>
> [1] : 
> https://mail.openjdk.java.net/pipermail/panama-dev/2019-February/004360.html


More information about the panama-dev mailing list