summary refs log tree commit diff stats
path: root/compiler/extccomp.nim
diff options
context:
space:
mode:
authorFlaviu Tamas <tamasflaviu@gmail.com>2015-05-23 14:34:11 -0400
committerFlaviu Tamas <tamasflaviu@gmail.com>2015-05-26 09:39:50 -0400
commite9516e6308687d3c92564ac54fc63f19470ccf2b (patch)
tree4a3102eaa55718aa31bae5ecbd0bd81f40bab1ea /compiler/extccomp.nim
parent4873db4c7218d1abc4cf43a17e1330628362801d (diff)
downloadNim-e9516e6308687d3c92564ac54fc63f19470ccf2b.tar.gz
Use sha1 instead of crc
Diffstat (limited to 'compiler/extccomp.nim')
-rw-r--r--compiler/extccomp.nim6
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