implements https://github.com/nim-lang/RFCs/issues/260 (#15505)
* implements https://github.com/nim-lang/RFCs/issues/260 * added a test case
This commit is contained in:
parent
dd86228548
commit
51e3e0c7c4
7 changed files with 49 additions and 12 deletions
9
tests/pragmas/tcompile_pragma.nim
Normal file
9
tests/pragmas/tcompile_pragma.nim
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
discard """
|
||||
output: '''34'''
|
||||
"""
|
||||
|
||||
{.compile("cfunction.c", "-DNUMBER_HERE=34").}
|
||||
|
||||
proc cfunction(): cint {.importc.}
|
||||
|
||||
echo cfunction()
|
||||
Loading…
Add table
Add a link
Reference in a new issue