mirror of
https://github.com/nim-lang/Nim.git
synced 2026-02-12 06:18:51 +00:00
split from #24204, closes #7674 The `{.size.}` pragma no longer restricts the given size to 1, 2, 4 or 8 if it is used for an imported type. This is not tested very thoroughly but there's no obvious reason to disallow it.
11 lines
126 B
Nim
11 lines
126 B
Nim
{.emit: """
|
|
typedef struct Foo {
|
|
NI64 a;
|
|
NI64 b;
|
|
} Foo;
|
|
""".}
|
|
|
|
type Foo {.importc: "Foo", size: 16.} = object
|
|
|
|
var x: Foo
|