small cleanups

This commit is contained in:
Araq 2013-02-19 23:32:32 +01:00
commit 1342798cc7
2 changed files with 3 additions and 5 deletions

View file

@ -180,9 +180,7 @@ proc readLine*(s: PStream): TaintedString =
if c == '\c': if c == '\c':
c = readChar(s) c = readChar(s)
break break
if c == '\b': if c == '\L' or c == '\0':
result.string.setLen(result.len - 1)
elif c == '\L' or c == '\0':
break break
else: else:
result.string.add(c) result.string.add(c)

View file

@ -186,9 +186,9 @@ when not defined(niminheritable):
when not defined(JS) and not defined(NimrodVM): when not defined(JS) and not defined(NimrodVM):
type type
TGenericSeq* {.compilerproc, pure, inheritable.} = object TGenericSeq {.compilerproc, pure, inheritable.} = object
len, reserved: int len, reserved: int
PGenericSeq* {.exportc.} = ptr TGenericSeq PGenericSeq {.exportc.} = ptr TGenericSeq
# len and space without counting the terminating zero: # len and space without counting the terminating zero:
NimStringDesc {.compilerproc, final.} = object of TGenericSeq NimStringDesc {.compilerproc, final.} = object of TGenericSeq
data: array[0..100_000_000, char] data: array[0..100_000_000, char]