diff options
author | Flaviu Tamas <tamasflaviu@gmail.com> | 2015-05-23 14:34:11 -0400 |
---|---|---|
committer | Flaviu Tamas <tamasflaviu@gmail.com> | 2015-05-26 09:39:50 -0400 |
commit | e9516e6308687d3c92564ac54fc63f19470ccf2b (patch) | |
tree | 4a3102eaa55718aa31bae5ecbd0bd81f40bab1ea /compiler/extccomp.nim | |
parent | 4873db4c7218d1abc4cf43a17e1330628362801d (diff) | |
download | Nim-e9516e6308687d3c92564ac54fc63f19470ccf2b.tar.gz |
Use sha1 instead of crc
Diffstat (limited to 'compiler/extccomp.nim')
-rw-r--r-- | compiler/extccomp.nim | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/compiler/extccomp.nim b/compiler/extccomp.nim index db6057b5e..2ddb98aba 100644 --- a/compiler/extccomp.nim +++ b/compiler/extccomp.nim @@ -585,13 +585,11 @@ proc externalFileChanged(filename: string): bool = return false var crcFile = toGeneratedFile(filename.withPackageName, "crc") - var currentCrc = int(footprint(filename)) + var currentCrc = footprint(filename) var f: File if open(f, crcFile, fmRead): - var line = newStringOfCap(40) - if not f.readLine(line): line = "0" + let oldCrc = parseSecureHash(f.readLine()) close(f) - var oldCrc = parseInt(line) result = oldCrc != currentCrc else: result = true |