Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
timotheecour committed Mar 6, 2021
1 parent 24c667a commit 18dc326
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions compiler/pragmas.nim
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,10 @@ proc processImportCompilerProc(c: PContext; s: PSym, extname: string, info: TLin
proc processImportCpp(c: PContext; s: PSym, extname: string, info: TLineInfo) =
var extname = extname
let isFreeFunction = extname.startsWith "!"
#[
example: `proc fun2(a: cstring): cint {.importcpp:"!fun2".}`
see more tests in tests/cpp/t12150.nim
]#
if isFreeFunction:
extname = extname[1..^1]
else:
Expand Down

0 comments on commit 18dc326

Please sign in to comment.