(cherry picked from commit fb878330a9)
This commit is contained in:
Andreas Rumpf
2019-06-27 14:46:38 +02:00
committed by narimiran
parent 843ae0073b
commit 3c3f07cfde

View File

@@ -3416,7 +3416,7 @@ template newException*(exceptn: typedesc, message: string;
e.parent = parentException
e
when hostOS == "standalone":
when defined(nogc):
proc nimToCStringConv(s: NimString): cstring {.compilerProc, inline.} =
if s == nil or s.len == 0: result = cstring""
else: result = cstring(addr s.data)