diff options
author | Xavier Leroy <xavier.leroy@inria.fr> | 1997-05-15 13:26:39 +0000 |
---|---|---|
committer | Xavier Leroy <xavier.leroy@inria.fr> | 1997-05-15 13:26:39 +0000 |
commit | 1737066bf364d125a1a690b0065d208805511b5b (patch) | |
tree | 078cb0c6c1ebb1191b24cdbf42c995f1b5ab92e0 | |
parent | a18263098866abcc6eb960dc38bc2f685ca3d96f (diff) | |
download | ocaml-1737066bf364d125a1a690b0065d208805511b5b.tar.gz |
Nouvelle gestion du CRC de l'interface.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1554 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r-- | otherlibs/dynlink/dynlink.ml | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/otherlibs/dynlink/dynlink.ml b/otherlibs/dynlink/dynlink.ml index e76b042039..0e8ad6af47 100644 --- a/otherlibs/dynlink/dynlink.ml +++ b/otherlibs/dynlink/dynlink.ml @@ -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 *) |