diff options
author | Nindaleth <Nindaleth@users.noreply.github.com> | 2019-10-30 09:08:45 +0100 |
---|---|---|
committer | Miran <narimiran@disroot.org> | 2019-10-30 09:08:45 +0100 |
commit | 34dbc5699e8cb36e26bad5a57edc972b82f26c5f (patch) | |
tree | de04803327f19ef69b46ca46b4e16a09f77fa6d1 /lib/system | |
parent | 1214960a1bde9b45c76caaff0cdea7d2d753b205 (diff) | |
download | Nim-34dbc5699e8cb36e26bad5a57edc972b82f26c5f.tar.gz |
fix several typos in documentation and comments (#12553)
Diffstat (limited to 'lib/system')
-rw-r--r-- | lib/system/gc_regions.nim | 2 | ||||
-rw-r--r-- | lib/system/io.nim | 4 | ||||
-rw-r--r-- | lib/system/sysstr.nim | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/lib/system/gc_regions.nim b/lib/system/gc_regions.nim index 797eeeebf..b7d1d302b 100644 --- a/lib/system/gc_regions.nim +++ b/lib/system/gc_regions.nim @@ -213,7 +213,7 @@ proc dealloc(r: var MemRegion; p: pointer; size: int) = if it.typ != nil and it.typ.finalizer != nil: (cast[Finalizer](it.typ.finalizer))(p) it.typ = nil - # it is benefitial to not use the free lists here: + # it is beneficial to not use the free lists here: if r.bump -! size == p: dec r.bump, size when false: diff --git a/lib/system/io.nim b/lib/system/io.nim index a3ac235a9..76bf41b11 100644 --- a/lib/system/io.nim +++ b/lib/system/io.nim @@ -115,8 +115,8 @@ proc c_fprintf(f: File, frmt: cstring): cint {. proc c_fputc(c: char, f: File): cint {. importc: "fputc", header: "<stdio.h>".} -## When running nim in android app stdout goes no where, so echo gets ignored -## To redreict echo to the android logcat use -d:androidNDK +## When running nim in android app, stdout goes nowhere, so echo gets ignored +## To redirect echo to the android logcat, use -d:androidNDK when defined(androidNDK): const ANDROID_LOG_VERBOSE = 2.cint proc android_log_print(prio: cint, tag: cstring, fmt: cstring): cint diff --git a/lib/system/sysstr.nim b/lib/system/sysstr.nim index 6201a1c74..853397e0a 100644 --- a/lib/system/sysstr.nim +++ b/lib/system/sysstr.nim @@ -325,7 +325,7 @@ proc setLengthSeq(seq: PGenericSeq, elemSize, newLen: int): PGenericSeq {. # cell is aliased by another pointer (ie proc parameter or a let variable). # This is a tough problem, because even if we don't zeroMem here, in the # presence of user defined destructors, the user will expect the cell to be - # "destroyed" thus creating the same problem. We can destoy the cell in the + # "destroyed" thus creating the same problem. We can destroy the cell in the # finalizer of the sequence, but this makes destruction non-deterministic. zeroMem(cast[pointer](cast[ByteAddress](result) +% GenericSeqSize +% (newLen*%elemSize)), (result.len-%newLen) *% elemSize) @@ -361,7 +361,7 @@ proc setLengthSeqV2(s: PGenericSeq, typ: PNimType, newLen: int): PGenericSeq {. # cell is aliased by another pointer (ie proc parameter or a let variable). # This is a tough problem, because even if we don't zeroMem here, in the # presence of user defined destructors, the user will expect the cell to be - # "destroyed" thus creating the same problem. We can destoy the cell in the + # "destroyed" thus creating the same problem. We can destroy the cell in the # finalizer of the sequence, but this makes destruction non-deterministic. zeroMem(cast[pointer](cast[ByteAddress](result) +% GenericSeqSize +% (newLen*%elemSize)), (result.len-%newLen) *% elemSize) |