[other] preparations for --styleCheck:error for the Nim compiler (#11478)

This commit is contained in:
Andreas Rumpf 2019-06-12 08:35:32 +02:00 • committed by GitHub
commit 572b7c37a5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 45 additions and 43 deletions

View file

@ -118,11 +118,11 @@ elif defined(windows) or defined(dos):
proc nimGetProcAddr(lib: LibHandle, name: cstring): ProcAddr =
result = getProcAddress(cast[THINSTANCE](lib), name)
if result != nil: return
const decorated_length = 250
var decorated: array[decorated_length, char]
const decoratedLength = 250
var decorated: array[decoratedLength, char]
decorated[0] = '_'
var m = 1
while m < (decorated_length - 5):
while m < (decoratedLength - 5):
if name[m - 1] == '\x00': break
decorated[m] = name[m - 1]
inc(m)