summary refs log tree commit diff stats
path: root/compiler/rodwrite.nim
diff options
context:
space:
mode:
authorFlaviu Tamas <tamasflaviu@gmail.com>2015-05-23 12:59:15 -0400
committerFlaviu Tamas <tamasflaviu@gmail.com>2015-05-23 13:01:52 -0400
commit188bba2b3cd3106e0c615e712b8f5fdd995137bb (patch)
tree8343b9cf10d802edc48f25f8b263fcf92e6737b6 /compiler/rodwrite.nim
parent5ad9d874c32a72ab473d3455b5d72f915729d195 (diff)
downloadNim-188bba2b3cd3106e0c615e712b8f5fdd995137bb.tar.gz
Clean up crc module
Use better names, remove quite a bit of dead code.
Change `><` to a name that's actually descriptive.
Diffstat (limited to 'compiler/rodwrite.nim')
-rw-r--r--compiler/rodwrite.nim8
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rodwrite.nim b/compiler/rodwrite.nim
index e178b7ce6..c83e728db 100644
--- a/compiler/rodwrite.nim
+++ b/compiler/rodwrite.nim
@@ -20,7 +20,7 @@ import
 type 
   TRodWriter = object of TPassContext
     module: PSym
-    crc: TCrc32
+    crc: SecureHash
     options: TOptions
     defines: string
     inclDeps: string
@@ -38,7 +38,7 @@ type
 
   PRodWriter = ref TRodWriter
 
-proc newRodWriter(crc: TCrc32, module: PSym): PRodWriter
+proc newRodWriter(crc: SecureHash, module: PSym): PRodWriter
 proc addModDep(w: PRodWriter, dep: string)
 proc addInclDep(w: PRodWriter, dep: string)
 proc addInterfaceSym(w: PRodWriter, s: PSym)
@@ -62,7 +62,7 @@ proc fileIdx(w: PRodWriter, filename: string): int =
 template filename*(w: PRodWriter): string =
   w.module.filename
 
-proc newRodWriter(crc: TCrc32, module: PSym): PRodWriter = 
+proc newRodWriter(crc: SecureHash, module: PSym): PRodWriter = 
   new(result)
   result.sstack = @[]
   result.tstack = @[]
@@ -96,7 +96,7 @@ proc addInclDep(w: PRodWriter, dep: string) =
   var resolved = dep.findModule(w.module.info.toFullPath)
   encodeVInt(fileIdx(w, dep), w.inclDeps)
   add(w.inclDeps, " ")
-  encodeVInt(crcFromFile(resolved), w.inclDeps)
+  encodeVInt(secureHashFile(resolved), w.inclDeps)
   add(w.inclDeps, rodNL)
 
 proc pushType(w: PRodWriter, t: PType) =