RFR: 7903239: ofAddress factory of function pointer type is wrong for struct returns [v3]

Maurizio Cimadamore mcimadamore at openjdk.org
Thu Aug 4 10:23:32 UTC 2022


On Wed, 3 Aug 2022 22:16:27 GMT, Marko <duke at openjdk.org> wrote:

>> When generating the lambda inside the `ofAddress` factory, it is missing the `SegmentAllocator` needed when the function returns a struct. This is [implemented for regular functions](https://github.com/openjdk/jextract/blob/0582eaf1b4cdba95f0ee8c2480767433bb647d0d/src/main/java/org/openjdk/jextract/impl/HeaderFileBuilder.java#L122-L127), but not for function pointers.
>
> Marko has updated the pull request incrementally with one additional commit since the last revision:
> 
>   update copyright

Marked as reviewed by mcimadamore (Committer).

test/jtreg/generator/test7903239/libTest7903239.c line 34:

> 32: };
> 33: 
> 34: struct Foo foo = { a, b };

Watch out: newline needed at the end

-------------

PR: https://git.openjdk.org/jextract/pull/58


More information about the jextract-dev mailing list