On Wed, 3 May 2023 13:48:11 GMT, Per Minborg <pminb...@openjdk.org> wrote:

> Isn't this true also for sequence layouts where, for example, the second 
> element might be misaligned for `sequenceLayout(2, structLayout(JAVA_INT, 
> JAVA_SHORT))`? Or, is this already covered?

That case already has some javadoc text:

https://cr.openjdk.org/~pminborg/panama/21/v2/javadoc/api/java.base/java/lang/foreign/MemoryLayout.html#sequenceLayout(long,java.lang.foreign.MemoryLayout)

(both factories throw if the alignment of the element layout is bigger than its 
size). It seems like I only forgot to add extra doc for structs.

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

PR Comment: https://git.openjdk.org/jdk/pull/13770#issuecomment-1533109597

Reply via email to