BUG: SystemABI C_LONG and C_LONGLONG are the same

Maurizio Cimadamore maurizio.cimadamore at oracle.com
Fri May 15 00:34:12 UTC 2020


On 15/05/2020 01:20, Ty Young wrote:
> It's primarily used for structs:
>
>
> https://github.com/BlueGoliath/Crosspoint/blob/master/src/main/java/org/goliath/crosspoint/structs/BasicNativeStruct.java#L65 
>
>
>
> The bindings structs just use an internal struct and wrap for type 
> safety.

I just stumbled on that when replying to your other email about odd 
results when reading from nvidia struct.

IMHO to make this code more reliable you need to attach more info to the 
layouts of your structs, so that for each field you know what CrossPoint 
type you wanna create.

If you have some enum with all the types you support - then you can just 
attach enum constants to struct field layouts - and then you can recover 
that layout attribute from the logic in BasicNativeStruct, and make sure 
that the right wrapping abstraction is created.

Maurizio



More information about the panama-dev mailing list