make Nim compiler compile with 0.15.2

This commit is contained in:
Araq 2017-01-07 02:43:31 +01:00
commit 5c08ca7ed2
2 changed files with 22 additions and 6 deletions

View file

@ -773,9 +773,12 @@ from json import escapeJson
proc writeJsonBuildInstructions*(projectfile: string) =
template lit(x: untyped) = f.write x
template str(x: untyped) =
buf.setLen 0
escapeJson(x, buf)
f.write buf
when compiles(escapeJson(x, buf)):
buf.setLen 0
escapeJson(x, buf)
f.write buf
else:
f.write escapeJson(x)
proc cfiles(f: File; buf: var string; list: TLinkedList, isExternal: bool) =
var it = PStrEntry(list.head)