make tmemfile2 work again
This commit is contained in:
parent
20950ee073
commit
8bcaee1fdf
3 changed files with 6 additions and 3 deletions
|
|
@ -399,7 +399,8 @@ iterator lines*(mfile: MemFile, buf: var TaintedString, delim='\l', eat='\r'): T
|
|||
|
||||
for ms in memSlices(mfile, delim, eat):
|
||||
setLen(buf.string, ms.size)
|
||||
copyMem(buf.cstring, ms.data, ms.size)
|
||||
if ms.size > 0:
|
||||
copyMem(addr buf[0], ms.data, ms.size)
|
||||
yield buf
|
||||
|
||||
iterator lines*(mfile: MemFile, delim='\l', eat='\r'): TaintedString {.inline.} =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue