diff options
author | flywind <xzsflywind@gmail.com> | 2022-03-24 03:57:13 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-23 20:57:13 +0100 |
commit | 2c01c9c4c8a20772ebbb91f3333feb5dbcc94e9e (patch) | |
tree | 60795b8aa24479de3d1648f607f9316c58770db1 /tests/ccgbugs | |
parent | b0bd4320a0cd9a90acf44bca0dddf10fa5022969 (diff) | |
download | Nim-2c01c9c4c8a20772ebbb91f3333feb5dbcc94e9e.tar.gz |
output byref types into --header file [backport: 1.6] (#19505)
* output byref types into --header file fix #19445 * fix comments * set targets
Diffstat (limited to 'tests/ccgbugs')
-rw-r--r-- | tests/ccgbugs/m19445.c | 3 | ||||
-rw-r--r-- | tests/ccgbugs/t19445.nim | 13 |
2 files changed, 16 insertions, 0 deletions
diff --git a/tests/ccgbugs/m19445.c b/tests/ccgbugs/m19445.c new file mode 100644 index 000000000..74c23d4b4 --- /dev/null +++ b/tests/ccgbugs/m19445.c @@ -0,0 +1,3 @@ +#include "m19445.h" + +const Foo f = {10, 20, 30, 40}; \ No newline at end of file diff --git a/tests/ccgbugs/t19445.nim b/tests/ccgbugs/t19445.nim new file mode 100644 index 000000000..b6e8d028c --- /dev/null +++ b/tests/ccgbugs/t19445.nim @@ -0,0 +1,13 @@ +discard """ + matrix: "--nimcache:tests/ccgbugs/nimcache19445 --cincludes:nimcache19445 --header:m19445" + targets: "c" +""" + +# bug #19445 +type + Foo* {.exportc.} = object + a*, b*, c*, d*: int + +proc dummy(): Foo {.exportc.} = discard + +{.compile:"m19445.c".} \ No newline at end of file |