mirror of
https://github.com/Ed94/Odin.git
synced 2026-07-28 18:30:06 +00:00
Update demo.odin to #align(N) style
This commit is contained in:
@@ -560,7 +560,7 @@ struct_type :: proc() {
|
|||||||
{
|
{
|
||||||
// Structs can tagged with different memory layout and alignment requirements:
|
// Structs can tagged with different memory layout and alignment requirements:
|
||||||
|
|
||||||
a :: struct #align 4 {} // align to 4 bytes
|
a :: struct #align(4) {} // align to 4 bytes
|
||||||
b :: struct #packed {} // remove padding between fields
|
b :: struct #packed {} // remove padding between fields
|
||||||
c :: struct #raw_union {} // all fields share the same offset (0). This is the same as C's union
|
c :: struct #raw_union {} // all fields share the same offset (0). This is the same as C's union
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user