Re-enable remove static

This commit is contained in:
Joey Yakimowich-Payne 2019-03-22 09:15:49 -06:00
commit 69b9ee9083

View file

@ -31,6 +31,7 @@ proc c2nim*(fl, outfile: string, c2nimConfig: c2nimConfigObj) =
if c2nimConfig.defines and (c2nimConfig.preprocess or c2nimConfig.ctags):
prepend(cfile, getDefines(file, c2nimConfig.inline))
removeStatic(cfile)
var
extflags = ""
passC = ""
@ -101,6 +102,8 @@ proc c2nim*(fl, outfile: string, c2nimConfig: c2nimConfigObj) =
removeFile(cfile)
except:
discard
else:
reAddStatic(cfile)
# Nim doesn't like {.cdecl.} for type proc()
freplace(outfile, re"(?m)(.*? = proc.*?)\{.cdecl.\}", "$1")
@ -120,4 +123,4 @@ proc c2nim*(fl, outfile: string, c2nimConfig: c2nimConfigObj) =
# Add dynamic library
if outlib != "":
prepend(outfile, outlib)
prepend(outfile, outlib)