-
Type:
Bug
-
Resolution: Fixed
-
Priority:
P3
-
None
-
Affects Version/s: repo-panama
-
Component/s: tools
For layouts such as these:
struct Foo {
int x;
union {
int y;
int z;
};
};
Jextract will generate:
static final MemoryLayout Foo$struct$LAYOUT_ = MemoryLayout.ofStruct(
C_INT.withName("x"),
C_INT.withName("y"),
C_INT.withName("z")
).withName("Foo");
We should change the layout generation to not flatten layouts of nested anonymous structs into their parents.
struct Foo {
int x;
union {
int y;
int z;
};
};
Jextract will generate:
static final MemoryLayout Foo$struct$LAYOUT_ = MemoryLayout.ofStruct(
C_INT.withName("x"),
C_INT.withName("y"),
C_INT.withName("z")
).withName("Foo");
We should change the layout generation to not flatten layouts of nested anonymous structs into their parents.