diff options
| author | Ganesh Viswanathan <dev@genotrance.com> | 2019-01-10 13:07:55 -0600 |
|---|---|---|
| committer | Ganesh Viswanathan <dev@genotrance.com> | 2019-01-10 13:07:55 -0600 |
| commit | c65c566e09faf11f374429e3dbe573cc09f5aba9 (patch) | |
| tree | d27b30f85fab16c11e434d5ec1a6aede23e487fd | |
| parent | ac7231a882b5cd0d30110bae74480314d4ded939 (diff) | |
| download | nimterop-c65c566e09faf11f374429e3dbe573cc09f5aba9.tar.gz nimterop-c65c566e09faf11f374429e3dbe573cc09f5aba9.zip | |
Filter out gcc attributes
| -rw-r--r-- | nimterop/getters.nim | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/nimterop/getters.nim b/nimterop/getters.nim index b4eb13b..4d217a7 100644 --- a/nimterop/getters.nim +++ b/nimterop/getters.nim @@ -141,10 +141,7 @@ proc getPreprocessor*(fullpath: string, mode = "cpp"): string = else: if start: rdata.add( - line.multiReplace([("_Noreturn", ""), ("(())", ""), ("WINAPI", ""), - ("__attribute__", ""), ("extern \"C\"", "")]) - .replace(re"\(\([_a-z]+?\)\)", "") - .replace(re"\(\(__format__[\s]*\(__[gnu_]*printf__, [\d]+, [\d]+\)\)\);", ";") + line.replace(re"__attribute__[ ]*\(\(.*?\)\) ", "") ) return rdata.join("\n") |
