From bcbfa3aaa4f05a002702528b0efa980dad8b5286 Mon Sep 17 00:00:00 2001 From: Araq Date: Tue, 3 Jan 2012 00:21:12 +0100 Subject: C sources regenerated for new len(openarray) header that catches more bugs; symbol files should work again --- lib/system.nim | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'lib') diff --git a/lib/system.nim b/lib/system.nim index 905bb9114..274b8d94e 100755 --- a/lib/system.nim +++ b/lib/system.nim @@ -309,15 +309,12 @@ proc newSeq*[T](s: var seq[T], len: int) {.magic: "NewSeq", noSideEffect.} ## This is equivalent to ``s = @[]; setlen(s, len)``, but more ## efficient since no reallocation is needed. -when defined(newOpenArrayLen): - proc len*[T: openArray](x: T): int {.magic: "LengthOpenArray", noSideEffect.} -else: - proc len*[T](x: openArray[T]): int {.magic: "LengthOpenArray", noSideEffect.} +proc len*[T: openArray](x: T): int {.magic: "LengthOpenArray", noSideEffect.} proc len*(x: string): int {.magic: "LengthStr", noSideEffect.} proc len*(x: cstring): int {.magic: "LengthStr", noSideEffect.} proc len*[I, T](x: array[I, T]): int {.magic: "LengthArray", noSideEffect.} proc len*[T](x: seq[T]): int {.magic: "LengthSeq", noSideEffect.} - ## returns the length of an array, a sequence or a string. + ## returns the length of an array, an openarray, a sequence or a string. ## This is rougly the same as ``high(T)-low(T)+1``, but its resulting type is ## always an int. -- cgit 1.4.1-2-gfad0