Skip to content

Commit

Permalink
stylecheck usages part two: stdlib cleanup
Browse files Browse the repository at this point in the history
importCompilerProc => importcompilerproc

newLineFlags => newlineFlags

JSRoot => JsRoot
  • Loading branch information
ringabout committed Jan 7, 2022
1 parent c7d5b8c commit a8ab38b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
18 changes: 9 additions & 9 deletions lib/core/typeinfo.nim
Original file line number Diff line number Diff line change
Expand Up @@ -114,19 +114,19 @@ when not defined(js):
template `rawType=`(x: var Any, p: PNimType) =
x.rawTypePtr = cast[pointer](p)

proc genericAssign(dest, src: pointer, mt: PNimType) {.importCompilerProc.}
proc genericAssign(dest, src: pointer, mt: PNimType) {.importcompilerproc.}

when not defined(gcDestructors):
proc genericShallowAssign(dest, src: pointer, mt: PNimType) {.importCompilerProc.}
proc incrSeq(seq: PGenSeq, elemSize, elemAlign: int): PGenSeq {.importCompilerProc.}
proc newObj(typ: PNimType, size: int): pointer {.importCompilerProc.}
proc newSeq(typ: PNimType, len: int): pointer {.importCompilerProc.}
proc objectInit(dest: pointer, typ: PNimType) {.importCompilerProc.}
proc genericShallowAssign(dest, src: pointer, mt: PNimType) {.importcompilerproc.}
proc incrSeq(seq: PGenSeq, elemSize, elemAlign: int): PGenSeq {.importcompilerproc.}
proc newObj(typ: PNimType, size: int): pointer {.importcompilerproc.}
proc newSeq(typ: PNimType, len: int): pointer {.importcompilerproc.}
proc objectInit(dest: pointer, typ: PNimType) {.importcompilerproc.}
else:
proc nimNewObj(size, align: int): pointer {.importCompilerProc.}
proc newSeqPayload(cap, elemSize, elemAlign: int): pointer {.importCompilerProc.}
proc nimNewObj(size, align: int): pointer {.importcompilerproc.}
proc newSeqPayload(cap, elemSize, elemAlign: int): pointer {.importcompilerproc.}
proc prepareSeqAdd(len: int; p: pointer; addlen, elemSize, elemAlign: int): pointer {.
importCompilerProc.}
importcompilerproc.}

template `+!!`(a, b): untyped = cast[pointer](cast[ByteAddress](a) + b)

Expand Down
2 changes: 1 addition & 1 deletion lib/impure/nre.nim
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ proc matchesCrLf(pattern: Regex): bool =
let newlineFlags = flags and (pcre.NEWLINE_CRLF or
pcre.NEWLINE_ANY or
pcre.NEWLINE_ANYCRLF)
if newLineFlags > 0u32:
if newlineFlags > 0u32:
return true

# get flags from build config
Expand Down
2 changes: 1 addition & 1 deletion lib/pure/os.nim
Original file line number Diff line number Diff line change
Expand Up @@ -2888,7 +2888,7 @@ when defined(nimdoc):

elif defined(nimscript): discard
elif defined(nodejs):
type Argv = object of JSRoot
type Argv = object of JsRoot
let argv {.importjs: "process.argv".} : Argv
proc len(argv: Argv): int {.importjs: "#.length".}
proc `[]`(argv: Argv, i: int): cstring {.importjs: "#[#]".}
Expand Down

0 comments on commit a8ab38b

Please sign in to comment.