From c65c566e09faf11f374429e3dbe573cc09f5aba9 Mon Sep 17 00:00:00 2001 From: Ganesh Viswanathan Date: Thu, 10 Jan 2019 13:07:55 -0600 Subject: [PATCH] Filter out gcc attributes --- nimterop/getters.nim | 5 +---- 1 file changed, 1 insertion(+), 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")