mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-03 19:52:36 +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.
(cherry picked from commit 1ef9a656d2)
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
|