On Mon, 23 Sep 2024 16:35:18 GMT, Per Minborg <[email protected]> wrote:
>> This PR prevents sequence layout with padding to be used with the Linker.
>
> Per Minborg has updated the pull request incrementally with one additional
> commit since the last revision:
>
> Reword doce
I'll add this here because the rules are still seems not complete. I can create
a structure ending with PaddingLayout
{
Linker linker = Linker.nativeLinker();
var sequence0a8 = MemoryLayout.sequenceLayout(0, JAVA_LONG);
var sequence3a1 = MemoryLayout.sequenceLayout(3, JAVA_BYTE);
var padding5a1 = MemoryLayout.paddingLayout(5);
var struct8a8 = MemoryLayout.structLayout(sequence0a8, sequence3a1,
padding5a1);
var fd = FunctionDescriptor.of(struct8a8, struct8a8, struct8a8);
linker.downcallHandle(fd);
}
-------------
PR Comment: https://git.openjdk.org/jdk/pull/21041#issuecomment-2396660563