diff options
| author | Ganesh Viswanathan <dev@genotrance.com> | 2019-01-31 22:10:43 -0600 |
|---|---|---|
| committer | Ganesh Viswanathan <dev@genotrance.com> | 2019-01-31 22:10:43 -0600 |
| commit | d6932247a9af7fe3eb83363c42c99c7e6f6d13b5 (patch) | |
| tree | ed6e4ec6eb54b62ea8918340a74cdf041b66d88a | |
| parent | 1807580c71b28f76ded313bb3227833bc6081d22 (diff) | |
| download | nimterop-d6932247a9af7fe3eb83363c42c99c7e6f6d13b5.tar.gz nimterop-d6932247a9af7fe3eb83363c42c99c7e6f6d13b5.zip | |
Remove preprocessor file lines, clean whitespace in types
| -rw-r--r-- | nimterop/cimport.nim | 2 | ||||
| -rw-r--r-- | nimterop/getters.nim | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/nimterop/cimport.nim b/nimterop/cimport.nim index 60e0781..6a258f8 100644 --- a/nimterop/cimport.nim +++ b/nimterop/cimport.nim @@ -458,5 +458,5 @@ macro cImport*(filename: static string, recurse: static bool = false): untyped = except: let (tmpFile, errors) = getNimCheckError(output) - doAssert false, errors & "Nimterop codegen limitation or error - review 'nim check' output above generated for " & tmpFile + doAssert false, errors & "\n\nNimterop codegen limitation or error - review 'nim check' output above generated for " & tmpFile diff --git a/nimterop/getters.nim b/nimterop/getters.nim index 9d8da6e..7c42583 100644 --- a/nimterop/getters.nim +++ b/nimterop/getters.nim @@ -81,6 +81,7 @@ proc getType*(str: string): string = return "object" result = str.strip(chars={'_'}). + replace(re"\s+", " "). replace(re"([u]?int[\d]+)_t", "$1"). replace(re"([u]?int)ptr_t", "ptr $1") @@ -232,8 +233,6 @@ proc getPreprocessor*(fullpath: string, mode = "cpp"): string = if inc.absolutePath().sanitizePath in saniLine: start = true break - if start: - rdata.add(&"// {line}") else: if start: if "#undef" in line: |
