diff options
Diffstat (limited to 'compiler/crc.nim')
-rw-r--r-- | compiler/crc.nim | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/crc.nim b/compiler/crc.nim index a3b181e20..3291ce7c0 100644 --- a/compiler/crc.nim +++ b/compiler/crc.nim @@ -18,8 +18,8 @@ const InitAdler32* = int32(1) proc updateCrc32*(val: int8, crc: TCrc32): TCrc32 {.inline.} -proc updateCrc32*(val: Char, crc: TCrc32): TCrc32 {.inline.} -proc crcFromBuf*(buf: Pointer, length: int): TCrc32 +proc updateCrc32*(val: char, crc: TCrc32): TCrc32 {.inline.} +proc crcFromBuf*(buf: pointer, length: int): TCrc32 proc strCrc32*(s: string): TCrc32 proc crcFromFile*(filename: string): TCrc32 proc updateAdler32*(adler: int32, buf: pointer, length: int): int32 @@ -75,7 +75,7 @@ const 755167117] proc updateCrc32(val: int8, crc: TCrc32): TCrc32 = - result = TCrc32(crc32Table[(int(crc) xor (int(val) and 0x000000FF)) and + result = TCrc32(crc32table[(int(crc) xor (int(val) and 0x000000FF)) and 0x000000FF]) xor (crc shr TCrc32(8)) proc updateCrc32(val: Char, crc: TCrc32): TCrc32 = @@ -102,7 +102,7 @@ proc crcFromFile(filename: string): TCrc32 = const bufSize = 8000 # don't use 8K for the memory allocator! var - bin: tfile + bin: TFile result = InitCrc32 if not open(bin, filename): return # not equal if file does not exist |