diff options
author | Charles Blake <cblake@csail.mit.edu> | 2015-07-28 06:45:07 -0400 |
---|---|---|
committer | Charles Blake <cblake@csail.mit.edu> | 2015-07-28 06:45:07 -0400 |
commit | f2c5676767fd9d9d25fc671a5be4577d029a8a16 (patch) | |
tree | 952bd7f876ae8a55fc01cc0cca506b5361bd1b4b /lib/pure/memfiles.nim | |
parent | a2b6a630feaf7e6165feeb44281a8f9526f5b2a3 (diff) | |
download | Nim-f2c5676767fd9d9d25fc671a5be4577d029a8a16.tar.gz |
Remove NUL termination unneeded post toNimStr fix.
Diffstat (limited to 'lib/pure/memfiles.nim')
-rw-r--r-- | lib/pure/memfiles.nim | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/lib/pure/memfiles.nim b/lib/pure/memfiles.nim index 4f92b0e2f..90797ecc6 100644 --- a/lib/pure/memfiles.nim +++ b/lib/pure/memfiles.nim @@ -273,7 +273,6 @@ iterator memSlices*(mfile: MemFile, delim='\l', eat='\r'): MemSlice {.inline.} = proc toString*(ms: MemSlice): string {.inline.} = proc toNimStr(str: cstring, len: int): string {. importc: "toNimStr" .} result = toNimStr(cast[cstring](ms.data), ms.size) - result[result.len] = '\0' # toNimStr copies 1 extra byte but does not NUL-term iterator lines*(mfile: MemFile): string {.inline.} = for ms in memSlices(mfile): yield toString(ms) |