summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2018-04-28 13:10:45 +0200
committerAndreas Rumpf <rumpf_a@web.de>2018-04-28 13:10:45 +0200
commit13a380bca6d64310eb1383434519b153f1b48e57 (patch)
tree05e5633f9b7665d7c8883a1ca4a0c9b8a9ed0c15 /compiler
parentaded62520b07fe4d03c36de8999b050b5678c4b8 (diff)
downloadNim-13a380bca6d64310eb1383434519b153f1b48e57.tar.gz
make tests green
Diffstat (limited to 'compiler')
-rw-r--r--compiler/ccgcalls.nim2
-rw-r--r--compiler/ccgexprs.nim2
2 files changed, 2 insertions, 2 deletions
diff --git a/compiler/ccgcalls.nim b/compiler/ccgcalls.nim
index 2323d1f26..2ddc88509 100644
--- a/compiler/ccgcalls.nim
+++ b/compiler/ccgcalls.nim
@@ -143,7 +143,7 @@ proc openArrayLoc(p: BProc, n: PNode): Rope =
 proc genArgStringToCString(p: BProc, n: PNode): Rope {.inline.} =
   var a: TLoc
   initLocExpr(p, n.sons[0], a)
-  result = "($1 ? $1->data : \"\")" % [a.rdLoc]
+  result = "($1 ? $1->data : (NCSTRING)\"\")" % [a.rdLoc]
 
 proc genArg(p: BProc, n: PNode, param: PSym; call: PNode): Rope =
   var a: TLoc
diff --git a/compiler/ccgexprs.nim b/compiler/ccgexprs.nim
index acf4c1975..dde3d6e70 100644
--- a/compiler/ccgexprs.nim
+++ b/compiler/ccgexprs.nim
@@ -1740,7 +1740,7 @@ proc genConv(p: BProc, e: PNode, d: var TLoc) =
 proc convStrToCStr(p: BProc, n: PNode, d: var TLoc) =
   var a: TLoc
   initLocExpr(p, n.sons[0], a)
-  putIntoDest(p, d, n, "($1 ? $1->data : \"\")" % [rdLoc(a)],
+  putIntoDest(p, d, n, "($1 ? $1->data : (NCSTRING)\"\")" % [rdLoc(a)],
               a.storage)
 
 proc convCStrToStr(p: BProc, n: PNode, d: var TLoc) =