RFR: 8319316: Clarify text around which layouts a linker supports

Maurizio Cimadamore mcimadamore at openjdk.org
Fri Nov 3 14:51:05 UTC 2023


On Fri, 3 Nov 2023 00:10:48 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:

> - Add linker note about packed structs.
> - Relax language a bit to avoid implying that only listed layouts are supported.

src/java.base/share/classes/java/lang/foreign/Linker.java line 247:

> 245:  * </ul>
> 246:  *
> 247:  * Linker implementations may optionally support additional layouts, such as 'packed' struct layouts.

Optional: should we say what a packed struct layout is? E.g. make `packed` italic. Then follow up with a sentence like: 

a packed struct is a struct in which there is at least one member layouts L whose offsets does not respect L's natural alignment: <example>

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

PR Review Comment: https://git.openjdk.org/jdk/pull/16485#discussion_r1381806211


More information about the core-libs-dev mailing list