* implements https://github.com/nim-lang/RFCs/issues/260

* added a test case
This commit is contained in:
Andreas Rumpf
2020-10-07 00:09:28 +02:00
committed by GitHub
parent dd86228548
commit 51e3e0c7c4
7 changed files with 49 additions and 12 deletions

View File

@@ -0,0 +1,4 @@
int cfunction(void) {
return NUMBER_HERE;
}

View File

@@ -0,0 +1,9 @@
discard """
output: '''34'''
"""
{.compile("cfunction.c", "-DNUMBER_HERE=34").}
proc cfunction(): cint {.importc.}
echo cfunction()