diff options
| author | Ganesh Viswanathan <dev@genotrance.com> | 2019-12-16 11:31:30 -0600 |
|---|---|---|
| committer | Ganesh Viswanathan <dev@genotrance.com> | 2019-12-16 11:31:30 -0600 |
| commit | 41847b1ba973486f847bffbe1644ec04514d17d5 (patch) | |
| tree | fe09af997cca7b62f6337b3333a3dab8756eb0d8 | |
| parent | 751128e75859de66e07be9888c8341fe3b553816 (diff) | |
| download | nimterop-bugs-2.tar.gz nimterop-bugs-2.zip | |
nocomments passed to preprocessor, origNamebugs-2
| -rw-r--r-- | nimterop/getters.nim | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/nimterop/getters.nim b/nimterop/getters.nim index 8e4a044..53e04f8 100644 --- a/nimterop/getters.nim +++ b/nimterop/getters.nim @@ -105,7 +105,7 @@ proc checkIdentifier(name, kind, parent, origName: string) = doAssert (not name.contains("__")): errmsg & " consecutive underscores '_'" if parent.nBl: - doAssert name.nBl, &"Blank identifier, originally '{parentStr}{name}' ({kind}), cannot be empty" + doAssert name.nBl, &"Blank identifier, originally '{parentStr}{origName}' ({kind}), cannot be empty" proc getIdentifier*(nimState: NimState, name: string, kind: NimSymKind, parent=""): string = doAssert name.nBl, "Blank identifier error" @@ -229,7 +229,8 @@ proc removeStatic(content: string): string = proc getPreprocessor*(gState: State, fullpath: string, mode = "cpp"): string = var mmode = if mode == "cpp": "c++" else: mode - cmd = &"""{getCompiler()} -E -CC -dD -x{mmode} -w """ + cmts = if gState.nocomments: "" else: "-CC" + cmd = &"""{getCompiler()} -E {cmts} -dD -x{mmode} -w """ rdata: seq[string] = @[] start = false |
