Fix typos

This commit is contained in:
Federico Ceratto 2015-02-15 16:20:32 +00:00
commit 657dca5c3b
81 changed files with 126 additions and 126 deletions

View file

@ -15,7 +15,7 @@ proc raiseOverflow {.compilerproc, noinline, noreturn.} =
sysFatal(OverflowError, "over- or underflow")
proc raiseDivByZero {.compilerproc, noinline, noreturn.} =
sysFatal(DivByZeroError, "divison by zero")
sysFatal(DivByZeroError, "division by zero")
proc addInt64(a, b: int64): int64 {.compilerProc, inline.} =
result = a +% b

View file

@ -13,7 +13,7 @@ proc addChar(s: NimString, c: char): NimString {.compilerProc, benign.}
type
TLibHandle = pointer # private type
TProcAddr = pointer # libary loading and loading of procs:
TProcAddr = pointer # library loading and loading of procs:
proc nimLoadLibrary(path: string): TLibHandle {.compilerproc.}
proc nimUnloadLibrary(lib: TLibHandle) {.compilerproc.}

View file

@ -8,7 +8,7 @@
#
# This file implements the ability to call native procs from libraries.
# It is not possible to do this in a platform independant way, unfortunately.
# It is not possible to do this in a platform independent way, unfortunately.
# However, the interface has been designed to take platform differences into
# account and been ported to all major platforms.

View file

@ -884,7 +884,7 @@ elif stackIncreases:
var
jmpbufSize {.importc: "sizeof(jmp_buf)", nodecl.}: int
# a little hack to get the size of a TJmpBuf in the generated C code
# in a platform independant way
# in a platform independent way
template forEachStackSlot(gch, gcMark: expr) {.immediate, dirty.} =
var registers: C_JmpBuf

View file

@ -1067,7 +1067,7 @@ proc stackSize(): int {.noinline.} =
var
jmpbufSize {.importc: "sizeof(jmp_buf)", nodecl.}: int
# a little hack to get the size of a TJmpBuf in the generated C code
# in a platform independant way
# in a platform independent way
when defined(sparc): # For SPARC architecture.
proc isOnStack(p: pointer): bool =
@ -1263,7 +1263,7 @@ proc unmarkStackAndRegisters(gch: var TGcHeap) =
# XXX no need for an atomic dec here:
if c.refcount--(LocalHeap):
# the object survived only because of a stack reference
# it still doesn't have heap refernces
# it still doesn't have heap references
addZCT(gch.zct, c)
if canbeCycleRoot(c):

View file

@ -476,7 +476,7 @@ elif stackIncreases:
var
jmpbufSize {.importc: "sizeof(jmp_buf)", nodecl.}: int
# a little hack to get the size of a TJmpBuf in the generated C code
# in a platform independant way
# in a platform independent way
proc markStackAndRegisters(gch: var TGcHeap) {.noinline, cdecl.} =
var registers: C_JmpBuf

View file

@ -128,7 +128,7 @@ proc raiseOverflow {.exportc: "raiseOverflow", noreturn.} =
raise newException(OverflowError, "over- or underflow")
proc raiseDivByZero {.exportc: "raiseDivByZero", noreturn.} =
raise newException(DivByZeroError, "divison by zero")
raise newException(DivByZeroError, "division by zero")
proc raiseRangeError() {.compilerproc, noreturn.} =
raise newException(RangeError, "value out of range")

View file

@ -132,7 +132,7 @@ proc rawFileSize(file: File): int =
discard fseek(file, clong(oldPos), 0)
proc readAllFile(file: File, len: int): string =
# We aquire the filesize beforehand and hope it doesn't change.
# We acquire the filesize beforehand and hope it doesn't change.
# Speeds things up.
result = newString(int(len))
if readBuffer(file, addr(result[0]), int(len)) != len:

View file

@ -222,9 +222,9 @@ proc setLengthSeq(seq: PGenericSeq, elemSize, newLen: int): PGenericSeq {.
extGetCellType(result).base, waZctDecRef)
# XXX: zeroing out the memory can still result in crashes if a wiped-out
# cell is aliased by another pointer (ie proc paramter or a let variable).
# cell is aliased by another pointer (ie proc parameter or a let variable).
# This is a tought problem, because even if we don't zeroMem here, in the
# presense of user defined destructors, the user will expect the cell to be
# 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
# finalizer of the sequence, but this makes destruction non-deterministic.
zeroMem(cast[pointer](cast[ByteAddress](result) +% GenericSeqSize +%