summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2012-01-03 00:21:12 +0100
committerAraq <rumpf_a@web.de>2012-01-03 00:21:12 +0100
commitbcbfa3aaa4f05a002702528b0efa980dad8b5286 (patch)
tree3f44c853f00d721f92c8c209a9955b2117807d8e /lib
parentd32a1e9ba250ccf66f76f568bd2019f3eaa3d3e5 (diff)
downloadNim-bcbfa3aaa4f05a002702528b0efa980dad8b5286.tar.gz
C sources regenerated for new len(openarray) header that catches more bugs; symbol files should work again
Diffstat (limited to 'lib')
-rwxr-xr-xlib/system.nim7
1 files changed, 2 insertions, 5 deletions
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.