diff options
author | Timothee Cour <timothee.cour2@gmail.com> | 2019-09-06 03:54:44 -0700 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2019-09-06 12:54:44 +0200 |
commit | 32769c478bb15bb7b290992a85dbea702dbc1f95 (patch) | |
tree | 99174185f1254828da0a385ae958b189b428b4a6 /tests/cpp/mexportc.nim | |
parent | 83975543154f03b7803c1cb86a27e9c99e445b50 (diff) | |
download | Nim-32769c478bb15bb7b290992a85dbea702dbc1f95.tar.gz |
exportc now mangles same as importc, fixes #10578 (#12144)
* fixes #10578 * add tests * add changelog * add {.exportcpp.}
Diffstat (limited to 'tests/cpp/mexportc.nim')
-rw-r--r-- | tests/cpp/mexportc.nim | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/cpp/mexportc.nim b/tests/cpp/mexportc.nim new file mode 100644 index 000000000..dee51f157 --- /dev/null +++ b/tests/cpp/mexportc.nim @@ -0,0 +1,9 @@ +{.used.} # ideally, would not be needed + +var fun0 {.exportc.} = 10 +proc fun1() {.exportc.} = discard +proc fun2() {.exportc: "$1".} = discard +proc fun3() {.exportc: "fun3Bis".} = discard + +when defined cpp: + proc funx1() {.exportcpp.} = discard |