Remove preprocessor file lines, clean whitespace in types
This commit is contained in:
parent
1807580c71
commit
d6932247a9
2 changed files with 2 additions and 3 deletions
|
|
@ -458,5 +458,5 @@ macro cImport*(filename: static string, recurse: static bool = false): untyped =
|
||||||
except:
|
except:
|
||||||
let
|
let
|
||||||
(tmpFile, errors) = getNimCheckError(output)
|
(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
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -81,6 +81,7 @@ proc getType*(str: string): string =
|
||||||
return "object"
|
return "object"
|
||||||
|
|
||||||
result = str.strip(chars={'_'}).
|
result = str.strip(chars={'_'}).
|
||||||
|
replace(re"\s+", " ").
|
||||||
replace(re"([u]?int[\d]+)_t", "$1").
|
replace(re"([u]?int[\d]+)_t", "$1").
|
||||||
replace(re"([u]?int)ptr_t", "ptr $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:
|
if inc.absolutePath().sanitizePath in saniLine:
|
||||||
start = true
|
start = true
|
||||||
break
|
break
|
||||||
if start:
|
|
||||||
rdata.add(&"// {line}")
|
|
||||||
else:
|
else:
|
||||||
if start:
|
if start:
|
||||||
if "#undef" in line:
|
if "#undef" in line:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue