parent
7e53c1c5c5
commit
7e9cda7dba
4 changed files with 17 additions and 4 deletions
3
tests/compilepragma/test.c
Normal file
3
tests/compilepragma/test.c
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
int foo(int a, int b) {
|
||||
return a+b;
|
||||
}
|
||||
10
tests/compilepragma/test.nim
Normal file
10
tests/compilepragma/test.nim
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
discard """
|
||||
output: '''44'''
|
||||
joinable: "false"
|
||||
"""
|
||||
|
||||
{.compile: "test.c".}
|
||||
|
||||
proc foo(a, b: cint): cint {.importc: "foo", cdecl.}
|
||||
|
||||
echo foo(40, 4)
|
||||
Loading…
Add table
Add a link
Reference in a new issue