Nouvelle gestion du CRC de l'interface.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1554 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02master
parent
a182630988
commit
1737066bf3
|
@ -43,14 +43,17 @@ let crc_interfaces = (Hashtbl.create 17 : (string, Digest.t) Hashtbl.t)
|
|||
let check_consistency file_name cu =
|
||||
List.iter
|
||||
(fun (name, crc) ->
|
||||
try
|
||||
let auth_crc = Hashtbl.find crc_interfaces name in
|
||||
if crc <> auth_crc then
|
||||
raise(Error(Inconsistent_import name))
|
||||
with Not_found ->
|
||||
raise(Error(Unavailable_unit name)))
|
||||
cu.cu_imports;
|
||||
Hashtbl.add crc_interfaces cu.cu_name cu.cu_interface
|
||||
if name = cu.cu_name then begin
|
||||
Hashtbl.add crc_interfaces name crc
|
||||
end else begin
|
||||
try
|
||||
let auth_crc = Hashtbl.find crc_interfaces name in
|
||||
if crc <> auth_crc then
|
||||
raise(Error(Inconsistent_import name))
|
||||
with Not_found ->
|
||||
raise(Error(Unavailable_unit name))
|
||||
end)
|
||||
cu.cu_imports
|
||||
|
||||
(* Reset the crc_interfaces table *)
|
||||
|
||||
|
|
Loading…
Reference in New Issue