summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2015-01-18 15:20:38 +0100
committerAraq <rumpf_a@web.de>2015-01-18 15:20:38 +0100
commitf6bdda2c5ea28df3862a065130962f663d48b9b2 (patch)
tree70db1a140dd98bc5ffa25bfe1ca3180b61471a01
parent5f6131cbdc8d1a09e91c7ef7a2268d84d6c7c4a6 (diff)
downloadNim-f6bdda2c5ea28df3862a065130962f663d48b9b2.tar.gz
fixes #1964
-rw-r--r--lib/system.nim5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/system.nim b/lib/system.nim
index 307e50d43..74d4f6d44 100644
--- a/lib/system.nim
+++ b/lib/system.nim
@@ -292,11 +292,12 @@ const NoFakeVars* = defined(NimrodVM) ## true if the backend doesn't support \
   ## "fake variables" like 'var EBADF {.importc.}: cint'.
 
 when not defined(JS):
+  const ArrayDummySize = when defined(cpu16): 10_000 else: 100_000_000
   type
     TGenericSeq {.compilerproc, pure, inheritable.} = object
       len, reserved: int
     PGenericSeq {.exportc.} = ptr TGenericSeq
-    UncheckedCharArray {.unchecked.} = array[0..100_000_000, char]
+    UncheckedCharArray {.unchecked.} = array[0..ArrayDummySize, char]
     # len and space without counting the terminating zero:
     NimStringDesc {.compilerproc, final.} = object of TGenericSeq
       data: UncheckedCharArray
@@ -1227,7 +1228,7 @@ type # these work for most platforms:
   culonglong* {.importc: "unsigned long long", nodecl.} = uint64
     ## This is the same as the type ``unsigned long long`` in *C*.
 
-  cstringArray* {.importc: "char**", nodecl.} = ptr array [0..50_000, cstring]
+  cstringArray* {.importc: "char**", nodecl.} = ptr array [0..ArrayDummySize, cstring]
     ## This is binary compatible to the type ``char**`` in *C*. The array's
     ## high value is large enough to disable bounds checking in practice.
     ## Use `cstringArrayToSeq` to convert it into a ``seq[string]``.