summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--compiler/nimlexbase.nim4
-rw-r--r--compiler/semfold.nim2
-rw-r--r--compiler/sighashes.nim2
-rw-r--r--compiler/suggest.nim2
4 files changed, 5 insertions, 5 deletions
diff --git a/compiler/nimlexbase.nim b/compiler/nimlexbase.nim
index 99d07d093..b8cb9f78a 100644
--- a/compiler/nimlexbase.nim
+++ b/compiler/nimlexbase.nim
@@ -104,7 +104,7 @@ proc fillBuffer(L: var TBaseLexer) =
         oldBufLen = L.bufLen
         L.bufLen = L.bufLen * 2
         L.bufStorage.setLen(L.bufLen)
-        L.buf = L.bufStorage
+        L.buf = L.bufStorage.cstring
         assert(L.bufLen - oldBufLen == oldBufLen)
         charsRead = llStreamRead(L.stream, addr(L.buf[oldBufLen]),
                                  oldBufLen)
@@ -147,7 +147,7 @@ proc openBaseLexer(L: var TBaseLexer, inputstream: PLLStream, bufLen = 8192) =
   L.bufpos = 0
   L.offsetBase = 0
   L.bufStorage = newString(bufLen)
-  L.buf = L.bufStorage
+  L.buf = L.bufStorage.cstring
   L.bufLen = bufLen
   L.sentinel = bufLen - 1
   L.lineStart = 0
diff --git a/compiler/semfold.nim b/compiler/semfold.nim
index 04ed73209..1f8efc4de 100644
--- a/compiler/semfold.nim
+++ b/compiler/semfold.nim
@@ -144,7 +144,7 @@ proc evalOp(m: TMagic, n, a, b, c: PNode; idgen: IdGenerator; g: ModuleGraph): P
       if a.typ.kind == tyString:
         result = newIntNodeT(toInt128(a.strVal.len), n, idgen, g)
       elif a.typ.kind == tyCstring:
-        result = newIntNodeT(toInt128(nimCStrLen(a.strVal)), n, idgen, g)
+        result = newIntNodeT(toInt128(nimCStrLen(a.strVal.cstring)), n, idgen, g)
     else:
       result = newIntNodeT(toInt128(a.len), n, idgen, g)
   of mUnaryPlusI, mUnaryPlusF64: result = a # throw `+` away
diff --git a/compiler/sighashes.nim b/compiler/sighashes.nim
index 01a0fa784..d02728627 100644
--- a/compiler/sighashes.nim
+++ b/compiler/sighashes.nim
@@ -18,7 +18,7 @@ proc `&=`(c: var MD5Context, ch: char) =
   # XXX suspicious code here; relies on ch being zero terminated?
   md5Update(c, unsafeAddr ch, 1)
 proc `&=`(c: var MD5Context, r: Rope) =
-  for l in leaves(r): md5Update(c, l, l.len)
+  for l in leaves(r): md5Update(c, l.cstring, l.len)
 proc `&=`(c: var MD5Context, i: BiggestInt) =
   md5Update(c, cast[cstring](unsafeAddr i), sizeof(i))
 proc `&=`(c: var MD5Context, f: BiggestFloat) =
diff --git a/compiler/suggest.nim b/compiler/suggest.nim
index eaa30040a..84c94d793 100644
--- a/compiler/suggest.nim
+++ b/compiler/suggest.nim
@@ -32,7 +32,7 @@
 
 # included from sigmatch.nim
 
-import algorithm, sets, prefixmatches, lineinfos, parseutils, linter, tables
+import algorithm, sets, prefixmatches, parseutils, tables
 from wordrecg import wDeprecated, wError, wAddr, wYield
 
 when defined(nimsuggest):