Read and write to and from SequenceLayout fields #277

Merged
jwharm merged 1 commit from array-fields into main 2025-09-27 15:15:01 +02:00
jwharm commented 2025-09-27 15:00:57 +02:00 (Migrated from github.com)

When Java-GI generates a MemoryLayout for a class, struct or union, a fixed-size array is represented by a SequenceLayout. Reading and writing values from such layouts is not possible with a regular VarHandle. This PR adds functionality to read and write these arrays by copying data from and to the memory segment directly.

When Java-GI generates a MemoryLayout for a class, struct or union, a fixed-size array is represented by a SequenceLayout. Reading and writing values from such layouts is not possible with a regular VarHandle. This PR adds functionality to read and write these arrays by copying data from and to the memory segment directly.
Sign in to join this conversation.
No description provided.