[foreign-jextract] No code generated for structs inside union

Maurizio Cimadamore maurizio.cimadamore at oracle.com
Fri Aug 7 14:10:51 UTC 2020


Hi Filip,
I've just integrated a fix for the issue you reported. The fix should 
now let jextract to "recurse" on nested anon structs/union.

It is possible that we'll need more work in order to fully rectify the 
situation, but the current fix should at least allow you to make more 
progress.

Let us know how it goes :-)

Cheers
Maurizio


On 06/08/2020 14:25, Filip Krakowski wrote:
> Hi,
>
> it seems that jextract does not generate code for structs declared 
> within unions. Tested with "ibv_send_wr" shown on the following man page.
>
> https://linux.die.net/man/3/ibv_post_send
>
> Although it is possible to get a MemorySegment for "wr", it's rather 
> difficult to work with it without having its corresponding 
> MemoryLayout. In this case it is relatively important to access the 
> fields of the structs in the union, as these describe how an operation 
> is to be executed.
>
> Best regards,
> Filip


More information about the panama-dev mailing list