diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pure/htmlparser.nim | 2 | ||||
-rw-r--r-- | lib/system.nim | 16 | ||||
-rw-r--r-- | lib/system/channels.nim | 3 | ||||
-rw-r--r-- | lib/system/threads.nim | 3 |
4 files changed, 15 insertions, 9 deletions
diff --git a/lib/pure/htmlparser.nim b/lib/pure/htmlparser.nim index c39f5ff97..060f0e386 100644 --- a/lib/pure/htmlparser.nim +++ b/lib/pure/htmlparser.nim @@ -554,7 +554,7 @@ proc parseHtml*(s: PStream, filename: string, ## parses the XML from stream `s` and returns a ``PXmlNode``. Every ## occured parsing error is added to the `errors` sequence. var x: TXmlParser - open(x, s, filename, {reportComments}) + open(x, s, filename, {reportComments, reportWhitespace}) next(x) # skip the DOCTYPE: if x.kind == xmlSpecial: next(x) diff --git a/lib/system.nim b/lib/system.nim index 5bd230e4c..dc5a406d1 100644 --- a/lib/system.nim +++ b/lib/system.nim @@ -374,10 +374,10 @@ 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. ## - ## Note that the sequence will be filled with uninitialized entries, which - ## can be a problem for sequences containing strings. After the creation of - ## the sequence you should assign entries to the sequence instead of adding - ## them. Example: + ## Note that the sequence will be filled with zeroed entries, which can be a + ## problem for sequences containing strings since their value will be + ## ``nil``. After the creation of the sequence you should assign entries to + ## the sequence instead of adding them. Example: ## ## .. code-block:: nimrod ## var inputStrings : seq[string] @@ -390,10 +390,10 @@ proc newSeq*[T](s: var seq[T], len: int) {.magic: "NewSeq", noSideEffect.} proc newSeq*[T](len = 0): seq[T] = ## creates a new sequence of type ``seq[T]`` with length ``len``. ## - ## Note that the sequence will be filled with uninitialized entries, which - ## can be a problem for sequences containing strings. After the creation of - ## the sequence you should assign entries to the sequence instead of adding - ## them. Example: + ## Note that the sequence will be filled with zeroed entries, which can be a + ## problem for sequences containing strings since their value will be + ## ``nil``. After the creation of the sequence you should assign entries to + ## the sequence instead of adding them. Example: ## ## .. code-block:: nimrod ## var inputStrings = newSeq[string](3) diff --git a/lib/system/channels.nim b/lib/system/channels.nim index d0294322a..9c3cc93e0 100644 --- a/lib/system/channels.nim +++ b/lib/system/channels.nim @@ -13,6 +13,9 @@ ## ## **Note:** The current implementation of message passing is slow and does ## not work with cyclic data structures. + +when not defined(NimString): + {.error: "You must not import this module explicitly".} type pbytes = ptr array[0.. 0xffff, byte] diff --git a/lib/system/threads.nim b/lib/system/threads.nim index 7d74de92d..104ca63c1 100644 --- a/lib/system/threads.nim +++ b/lib/system/threads.nim @@ -39,6 +39,9 @@ ## createThread(thr[i], threadFunc, (i*10, i*10+5)) ## joinThreads(thr) +when not defined(NimString): + {.error: "You must not import this module explicitly".} + const maxRegisters = 256 # don't think there is an arch with more registers useStackMaskHack = false ## use the stack mask hack for better performance |